Skip to content

Commit

Permalink
gpu: Fix attempt to use format string in expect().
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Dec 27, 2024
1 parent 8c73714 commit ba53757
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions all-is-cubes-gpu/src/in_wgpu/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ impl TextureCopyParameters {
texture.height(),
texture.depth_or_array_layers(),
),
byte_size_of_texel: format
.block_copy_size(None)
.expect("non-color texture format {format:} not supported"),
byte_size_of_texel: match format.block_copy_size(None) {
Some(val) => val,
None => panic!("non-color texture format {format:?} not supported"),
},
}
}

Expand Down

0 comments on commit ba53757

Please sign in to comment.