diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index 696dcc50..94569206 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -128,7 +128,7 @@ impl, K: Pod, V: Pod> LpmTrie { /// An iterator visiting all key-value pairs in arbitrary order. The /// iterator item type is `Result<(K, V), MapError>`. - pub fn iter(&self) -> MapIter<'_, K, V, Self> { + pub fn iter(&self) -> MapIter<'_, Key, V, Self> { MapIter::new(self) } @@ -172,14 +172,13 @@ impl, K: Pod, V: Pod> LpmTrie { } } -impl, K: Pod, V: Pod> IterableMap for LpmTrie { +impl, K: Pod, V: Pod> IterableMap, V> for LpmTrie { fn map(&self) -> &MapData { self.inner.as_ref() } - fn get(&self, key: &K) -> Result { - let lookup = Key::new(mem::size_of::() as u32, *key); - self.get(&lookup, 0) + fn get(&self, key: &Key) -> Result { + self.get(key, 0) } }