From 925baced46665abe71e13deac05f9bb097251e16 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Wed, 10 May 2023 16:01:24 +0100 Subject: [PATCH] Use backing_vec_size rather than nodes.len() --- agb-hashmap/src/node_storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb-hashmap/src/node_storage.rs b/agb-hashmap/src/node_storage.rs index 55a7d276..48d525c6 100644 --- a/agb-hashmap/src/node_storage.rs +++ b/agb-hashmap/src/node_storage.rs @@ -139,7 +139,7 @@ impl NodeStorage { 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()?;