Skip to content

Commit

Permalink
Documentation assertion in erase_index function
Browse files Browse the repository at this point in the history
(cherry picked from commit 4750dc7)
  • Loading branch information
stepancheg authored and cuviper committed Jun 16, 2022
1 parent 3921adf commit 20cf99a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/map/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ fn equivalent<'a, K, V, Q: ?Sized + Equivalent<K>>(

#[inline]
fn erase_index(table: &mut RawTable<usize>, 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]
Expand Down

0 comments on commit 20cf99a

Please sign in to comment.