diff --git a/agb/src/hash_map.rs b/agb/src/hash_map.rs index ecec173a..2b335f62 100644 --- a/agb/src/hash_map.rs +++ b/agb/src/hash_map.rs @@ -439,7 +439,7 @@ impl Node { impl Drop for Node { fn drop(&mut self) { - if self.distance_to_initial_bucket >= 0 { + if self.has_value() { unsafe { ptr::drop_in_place(self.key.as_mut_ptr()) }; unsafe { ptr::drop_in_place(self.value.as_mut_ptr()) }; }