diff --git a/version-ranges/src/lib.rs b/version-ranges/src/lib.rs index 1181b1ab..4360abff 100644 --- a/version-ranges/src/lib.rs +++ b/version-ranges/src/lib.rs @@ -836,6 +836,18 @@ impl Iterator for RangesIter { fn next(&mut self) -> Option { self.0.next() } + + fn size_hint(&self) -> (usize, Option) { + (self.0.len(), Some(self.0.len())) + } +} + +impl ExactSizeIterator for RangesIter {} + +impl DoubleEndedIterator for RangesIter { + fn next_back(&mut self) -> Option { + self.0.next_back() + } } impl IntoIterator for Ranges {