diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs index b00174bc..601502e3 100644 --- a/aya/src/maps/hash_map/hash_map.rs +++ b/aya/src/maps/hash_map/hash_map.rs @@ -79,7 +79,7 @@ impl, K: Pod, V: Pod> HashMap { impl, K: Pod, V: Pod> HashMap { /// Inserts a key-value pair into the map. pub fn insert(&mut self, key: impl Borrow, value: impl Borrow, flags: u64) -> Result<(), MapError> { - hash_map::insert(self.inner.as_mut(), key.borrow(), value.borrow(), flags) + hash_map::insert(self.inner.as_mut(), &key, &value, flags) } /// Removes a key from the map.