diff --git a/version-ranges/src/lib.rs b/version-ranges/src/lib.rs index 8eefa452..ae30062e 100644 --- a/version-ranges/src/lib.rs +++ b/version-ranges/src/lib.rs @@ -824,6 +824,11 @@ impl Ranges { pub fn iter(&self) -> impl Iterator, &Bound)> { self.segments.iter().map(|(start, end)| (start, end)) } + + /// Iterate over the parts of the range. + pub fn iter_mut(&mut self) -> impl Iterator, &mut Bound)> { + self.segments.iter_mut().map(|(start, end)| (start, end)) + } } // REPORT ######################################################################