mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
Use backing_vec_size rather than nodes.len()
This commit is contained in:
parent
c5341cb5fa
commit
925baced46
|
@ -139,7 +139,7 @@ impl<K, V, ALLOCATOR: ClonableAllocator> NodeStorage<K, V, ALLOCATOR> {
|
|||
Q: Eq + ?Sized,
|
||||
{
|
||||
for distance_to_initial_bucket in 0..(self.max_distance_to_initial_bucket + 1) {
|
||||
let location = (hash + distance_to_initial_bucket).fast_mod(self.nodes.len());
|
||||
let location = (hash + distance_to_initial_bucket).fast_mod(self.backing_vec_size());
|
||||
|
||||
let node = &self.nodes[location];
|
||||
let node_key_ref = node.key_ref()?;
|
||||
|
|
Loading…
Reference in a new issue