Ricky Han 2 years ago
parent
commit
9991ffb093
1 changed files with 1 additions and 1 deletions
  1. 1 1
      aya/src/maps/hash_map/hash_map.rs

+ 1 - 1
aya/src/maps/hash_map/hash_map.rs

@@ -79,7 +79,7 @@ impl<T: AsRef<MapData>, K: Pod, V: Pod> HashMap<T, K, V> {
 impl<T: AsMut<MapData>, K: Pod, V: Pod> HashMap<T, K, V> {
     /// Inserts a key-value pair into the map.
     pub fn insert(&mut self, key: impl Borrow<K>, value: impl Borrow<V>, 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.