From 9fa60ab566d3ad2610d77c1e12a0ea444cdfd316 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 24 Apr 2020 21:58:30 -0400 Subject: [PATCH] Minor error reporting fixes (#607) --- wgpu-core/src/device/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index cf8a47ee39..760ac18a85 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -1104,7 +1104,7 @@ impl Global { | binding_model::BindingType::SampledTexture | binding_model::BindingType::ReadonlyStorageTexture | binding_model::BindingType::WriteonlyStorageTexture => { - panic!("Mismatched buffer binding type for {:?}. Expected a type of UniformBuffer, StorageBuffer or ReadonlyStorageBuffer but found {:?}", decl, decl.ty) + panic!("Mismatched buffer binding type for {:?}. Expected a type of UniformBuffer, StorageBuffer or ReadonlyStorageBuffer", decl) } }; assert_eq!( @@ -1144,7 +1144,7 @@ impl Global { match decl.ty { binding_model::BindingType::Sampler | binding_model::BindingType::ComparisonSampler => {} - found => panic!("Mismatched sampler binding type in {:?}. Expected a type of Sampler or ComparisonSampler but found {:?}", decl.ty, found), + _ => panic!("Mismatched sampler binding type in {:?}. Expected a type of Sampler or ComparisonSampler", decl.ty), } let sampler = used .samplers @@ -1162,7 +1162,7 @@ impl Global { | binding_model::BindingType::WriteonlyStorageTexture => { (wgt::TextureUsage::STORAGE, hal::image::Layout::General) } - found => panic!("Mismatched texture binding type in {:?}. Expected a type of SampledTexture, ReadonlyStorageTexture or WriteonlyStorageTexture but found {:?}", decl, found), + _ => panic!("Mismatched texture binding type in {:?}. Expected a type of SampledTexture, ReadonlyStorageTexture or WriteonlyStorageTexture", decl), }; let view = used .views