diff --git a/src/range.rs b/src/range.rs index 4bb899f2..0817aded 100644 --- a/src/range.rs +++ b/src/range.rs @@ -542,6 +542,11 @@ impl Range { _ => None, } } + + /// Iterate over the parts of the range. + pub fn iter(&self) -> impl Iterator, Bound)> { + self.segments.iter() + } } impl VersionSet for Range {