diff --git a/agb/src/hash_map.rs b/agb/src/hash_map.rs index 655aa1b8..30028c04 100644 --- a/agb/src/hash_map.rs +++ b/agb/src/hash_map.rs @@ -314,8 +314,7 @@ where self.nodes .get_location(key, hash) - .map(|location| self.nodes.nodes[location].get_value_ref()) - .flatten() + .and_then(|location| self.nodes.nodes[location].get_value_ref()) } pub fn get_mut(&mut self, key: &K) -> Option<&mut V> {