Skip to content

Commit

Permalink
fix(const_eval): don't panic when vecN ctor.'s arg. count is < N
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Nov 8, 2024
1 parent 47d20d9 commit 544731f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions naga/src/proc/constant_evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ macro_rules! gen_component_wise_extractor {
for idx in 0..(size as u8).into() {
let group = component_groups
.iter()
.map(|cs| cs[idx])
.collect::<ArrayVec<_, N>>()
.map(|cs| cs.get(idx).cloned().ok_or(err.clone()))
.collect::<Result<ArrayVec<_, N>, _>>()?
.into_inner()
.unwrap();
new_components.push($ident(
Expand Down

0 comments on commit 544731f

Please sign in to comment.