mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
fix(const_eval): don't panic when a vecN
constructor's arg. count is less than N (#6508)
This commit is contained in:
parent
cffc7933fd
commit
5e68a63151
@ -72,6 +72,7 @@ Bottom level categories:
|
||||
#### Naga
|
||||
|
||||
- Fix crash when a texture argument is missing. By @aedm in [#6486](https://github.com/gfx-rs/wgpu/pull/6486)
|
||||
- Emit an error in constant evaluation, rather than crash, in certain cases where `vecN` constructors have less than N arguments. By @ErichDonGubler in [#6508](https://github.com/gfx-rs/wgpu/pull/6508).
|
||||
|
||||
#### General
|
||||
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user