Skip to content

Commit 42870ce

Browse files
committed
Implement ExactSizeIterator for object::Iter
1 parent c9c8195 commit 42870ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/object.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,12 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
588588
}
589589
}
590590

591+
impl<'a> ExactSizeIterator for Iter<'a> {
592+
fn len(&self) -> usize {
593+
self.inner.len()
594+
}
595+
}
596+
591597
pub struct IterMut<'a> {
592598
inner: slice::IterMut<'a, Node>
593599
}

0 commit comments

Comments
 (0)