From 4750dc7dfc28300a37cc8b2a2c6d536fb8b85ecd Mon Sep 17 00:00:00 2001 From: Stiopa Koltsov Date: Fri, 15 Apr 2022 23:19:49 +0100 Subject: [PATCH] Documentation assertion in erase_index function --- src/map/core.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/map/core.rs b/src/map/core.rs index 6479135d..50ebebea 100644 --- a/src/map/core.rs +++ b/src/map/core.rs @@ -44,7 +44,8 @@ fn equivalent<'a, K, V, Q: ?Sized + Equivalent>( #[inline] fn erase_index(table: &mut RawTable, hash: HashValue, index: usize) { - table.erase_entry(hash.get(), move |&i| i == index); + let erased = table.erase_entry(hash.get(), move |&i| i == index); + debug_assert!(erased); } #[inline]