We know the location is correct here

This commit is contained in:
Gwilym Inzani 2023-05-09 21:34:16 +01:00
parent 4d4ca80004
commit dc8589479e

View file

@ -399,7 +399,11 @@ where
let hash = self.hash(key);
if let Some(location) = self.nodes.location(key, hash) {
self.nodes.node_at_mut(location).value_mut()
Some(unsafe {
self.nodes
.node_at_unchecked_mut(location)
.value_mut_unchecked()
})
} else {
None
}