Remove very slow debug assertion in hubs (#2193) (#2203)

This commit is contained in:
James Beilby authored and GitHub committed 2021-11-22 13:58:53 +00:00
1 parent cd59c76e3a
commit ed7f8a84a3
1 file changed
-4
-4
View File
@@ -45,10 +45,6 @@ impl IdentityManager {
pub fn free<I: id::TypedId + Debug>(&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;