Skip to content

Commit da9744d

Browse files
committed
Implement ExactSizeIterator for object::IterMut
1 parent 42870ce commit da9744d

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
@@ -623,6 +623,12 @@ impl<'a> DoubleEndedIterator for IterMut<'a> {
623623
}
624624
}
625625

626+
impl<'a> ExactSizeIterator for IterMut<'a> {
627+
fn len(&self) -> usize {
628+
self.inner.len()
629+
}
630+
}
631+
626632
/// Implements indexing by `&str` to easily access object members:
627633
///
628634
/// ## Example

0 commit comments

Comments
 (0)