chore(trie): PrefixSet::iter (#8343)

This commit is contained in:
Roman Krasiuk
2024-05-22 15:56:50 +02:00
committed by GitHub
parent cd039d362b
commit c34b31ef53

View File

@ -161,6 +161,11 @@ impl PrefixSet {
false
}
/// Returns an iterator over reference to _all_ nibbles regardless of cursor position.
pub fn iter(&self) -> core::slice::Iter<'_, Nibbles> {
self.keys.iter()
}
/// Returns the number of elements in the set.
pub fn len(&self) -> usize {
self.keys.len()