Skip to content

Commit

Permalink
Fix formatting of TextureDimensionError::LimitExceeded. (#2799)
Browse files Browse the repository at this point in the history
in the thiserror error format string, `{0:?}` ends up referring to the
first named argument, not the first struct field or a compile error, so
the error was incorrectly
    Dimension 32768 value 32768 exceeds the limit of 16384
instead of
    Dimension X value 32768 exceeds the limit of 16384
  • Loading branch information
kpreid authored Jun 22, 2022
1 parent 7df4fd1 commit 2881a74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu-core/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ pub enum TextureErrorDimension {
pub enum TextureDimensionError {
#[error("Dimension {0:?} is zero")]
Zero(TextureErrorDimension),
#[error("Dimension {0:?} value {given} exceeds the limit of {limit}")]
#[error("Dimension {dim:?} value {given} exceeds the limit of {limit}")]
LimitExceeded {
dim: TextureErrorDimension,
given: u32,
Expand Down

0 comments on commit 2881a74

Please sign in to comment.