From 2881a74de96c8306d969034a8c8ca72ddd320426 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Tue, 21 Jun 2022 18:46:12 -0700 Subject: [PATCH] Fix formatting of TextureDimensionError::LimitExceeded. (#2799) 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 --- wgpu-core/src/resource.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index 4ef38b83f5..9335e79f87 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -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,