From ed7f8a84a342a70ffe3b1ecb489de9b8ce2f92aa Mon Sep 17 00:00:00 2001 From: James Beilby Date: Mon, 22 Nov 2021 13:58:53 +0000 Subject: [PATCH] Remove very slow debug assertion in hubs (#2193) (#2203) --- wgpu-core/src/hub.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wgpu-core/src/hub.rs b/wgpu-core/src/hub.rs index 41f263e378..898fe45f8a 100644 --- a/wgpu-core/src/hub.rs +++ b/wgpu-core/src/hub.rs @@ -45,10 +45,6 @@ impl IdentityManager { pub fn free(&mut self, id: I) { let (index, epoch, _backend) = id.unzip(); - // avoid doing this check in release - if cfg!(debug_assertions) { - assert!(!self.free.contains(&index)); - } let pe = &mut self.epochs[index as usize]; assert_eq!(*pe, epoch); *pe += 1;