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

This commit is contained in:
James Beilby
2021-11-22 13:58:53 +00:00
committed by GitHub
parent cd59c76e3a
commit ed7f8a84a3

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;