diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index 3cc711e5..a7d43703 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -139,8 +139,8 @@ impl, K: Pod, V: Pod> LpmTrie { /// An iterator visiting all keys matching key. The /// iterator item type is `Result, MapError>`. - pub fn iter_key(&self, key: Key) -> LpnTrieKeys<'_, K> { - LpnTrieKeys::new(self.inner.as_ref(), key) + pub fn iter_key(&self, key: Key) -> LpmTrieKeys<'_, K> { + LpmTrieKeys::new(self.inner.as_ref(), key) } } @@ -188,15 +188,15 @@ impl, K: Pod, V: Pod> IterableMap, V> for LpmTrie { +pub struct LpmTrieKeys<'coll, K: Pod> { map: &'coll MapData, err: bool, key: Key, } -impl<'coll, K: Pod> LpnTrieKeys<'coll, K> { - fn new(map: &'coll MapData, key: Key) -> LpnTrieKeys<'coll, K> { - LpnTrieKeys { +impl<'coll, K: Pod> LpmTrieKeys<'coll, K> { + fn new(map: &'coll MapData, key: Key) -> LpmTrieKeys<'coll, K> { + LpmTrieKeys { map, err: false, key, @@ -204,7 +204,7 @@ impl<'coll, K: Pod> LpnTrieKeys<'coll, K> { } } -impl Iterator for LpnTrieKeys<'_, K> { +impl Iterator for LpmTrieKeys<'_, K> { type Item = Result, MapError>; fn next(&mut self) -> Option, MapError>> {