From c038b5c433aeb3bc55f2091da56216e3f1c07e74 Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 1 Feb 2024 05:42:47 +0100 Subject: [PATCH] Consistent debug formatting --- wgpu-core/src/any_surface.rs | 4 +--- wgpu-core/src/device/any_device.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wgpu-core/src/any_surface.rs b/wgpu-core/src/any_surface.rs index cb6f9eb57..94edfc443 100644 --- a/wgpu-core/src/any_surface.rs +++ b/wgpu-core/src/any_surface.rs @@ -85,9 +85,7 @@ impl Drop for AnySurface { impl fmt::Debug for AnySurface { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("AnySurface") - .field(&self.vtable.backend) - .finish() + write!(f, "AnySurface<{}>", self.vtable.backend) } } diff --git a/wgpu-core/src/device/any_device.rs b/wgpu-core/src/device/any_device.rs index d08c23cf9..43ea9411d 100644 --- a/wgpu-core/src/device/any_device.rs +++ b/wgpu-core/src/device/any_device.rs @@ -92,7 +92,7 @@ impl Drop for AnyDevice { impl fmt::Debug for AnyDevice { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "AnyDevice") + write!(f, "AnyDevice<{}>", self.vtable.backend) } }