Skip to content

Commit ec1fbce

Browse files
daxpeddacuviper
andcommitted
Address review
Co-Authored-By: Josh Stone <[email protected]>
1 parent c94ed9a commit ec1fbce

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
However, exactness only applies to the direct capacity for items, while the
2727
raw hash table still follows its own rules for capacity and load factor.
2828

29-
- The `hashbrown` dependency has been updated to version 0.13.
29+
- The `hashbrown` dependency has been updated to version 0.14.
3030

3131
- The `serde_seq` module has been moved from the crate root to below the
3232
`map` module.

src/map/core/raw.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
171171
pub fn swap_remove_entry(self) -> (K, V) {
172172
// SAFETY: This is safe because it can only happen once (self is consumed)
173173
// and map.indices have not been modified since entry construction
174-
let index = unsafe { self.map.indices.remove(self.raw_bucket) };
175-
self.map.swap_remove_finish(index.0)
174+
let (index, _slot) = unsafe { self.map.indices.remove(self.raw_bucket) };
175+
self.map.swap_remove_finish(index)
176176
}
177177

178178
/// Remove and return the key, value pair stored in the map for this entry
@@ -185,7 +185,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
185185
pub fn shift_remove_entry(self) -> (K, V) {
186186
// SAFETY: This is safe because it can only happen once (self is consumed)
187187
// and map.indices have not been modified since entry construction
188-
let index = unsafe { self.map.indices.remove(self.raw_bucket) };
189-
self.map.shift_remove_finish(index.0)
188+
let (index, _slot) = unsafe { self.map.indices.remove(self.raw_bucket) };
189+
self.map.shift_remove_finish(index)
190190
}
191191
}

0 commit comments

Comments
 (0)