From a56698cbe6a5f63fec11bc94010d492f48c54d4b Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:49:22 +0200 Subject: [PATCH] use `.error_ident()` in a few more places --- wgpu-core/src/command/bind.rs | 18 ++++-------------- wgpu-core/src/device/resource.rs | 4 ++-- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/wgpu-core/src/command/bind.rs b/wgpu-core/src/command/bind.rs index a6c6aa9de..c195a207a 100644 --- a/wgpu-core/src/command/bind.rs +++ b/wgpu-core/src/command/bind.rs @@ -63,28 +63,18 @@ mod compat { bgl::Origin::Derived => "implicit", bgl::Origin::Pool => "explicit", }; - let expected_label = expected_bgl.label(); diff.push(format!( - "Should be compatible an with an {expected_bgl_type} bind group layout {}", - if expected_label.is_empty() { - "without label".to_string() - } else { - format!("with label = `{}`", expected_label) - } + "Should be compatible an with an {expected_bgl_type} {}", + expected_bgl.error_ident() )); if let Some(assigned_bgl) = self.assigned.as_ref() { let assigned_bgl_type = match assigned_bgl.origin { bgl::Origin::Derived => "implicit", bgl::Origin::Pool => "explicit", }; - let assigned_label = assigned_bgl.label(); diff.push(format!( - "Assigned {assigned_bgl_type} bind group layout {}", - if assigned_label.is_empty() { - "without label".to_string() - } else { - format!("with label = `{}`", assigned_label) - } + "Assigned {assigned_bgl_type} {}", + assigned_bgl.error_ident() )); for (id, e_entry) in expected_bgl.entries.iter() { if let Some(a_entry) = assigned_bgl.entries.get(*id) { diff --git a/wgpu-core/src/device/resource.rs b/wgpu-core/src/device/resource.rs index 4009ecfe8..ca789d0a0 100644 --- a/wgpu-core/src/device/resource.rs +++ b/wgpu-core/src/device/resource.rs @@ -345,7 +345,7 @@ impl Device { continue; }; - resource_log!("Destroy raw TextureView (destroyed) {:?}", view.label()); + resource_log!("Destroy raw {}", view.error_ident()); unsafe { use hal::Device; @@ -361,7 +361,7 @@ impl Device { continue; }; - resource_log!("Destroy raw BindGroup (destroyed) {:?}", bind_group.label()); + resource_log!("Destroy raw {}", bind_group.error_ident()); unsafe { use hal::Device;