Skip to content

Commit 1583860

Browse files
authored
Merge pull request #224 from stepancheg/erase-index
Documentation assertion in erase_index function
2 parents a31003c + 4750dc7 commit 1583860

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/map/core.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ fn equivalent<'a, K, V, Q: ?Sized + Equivalent<K>>(
4444

4545
#[inline]
4646
fn erase_index(table: &mut RawTable<usize>, hash: HashValue, index: usize) {
47-
table.erase_entry(hash.get(), move |&i| i == index);
47+
let erased = table.erase_entry(hash.get(), move |&i| i == index);
48+
debug_assert!(erased);
4849
}
4950

5051
#[inline]

0 commit comments

Comments
 (0)