From 23f48bab7556ebe0c44704031a98d5037b604610 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Tue, 9 Jan 2024 20:05:58 -0600 Subject: [PATCH] Add a public `Range.iter()` method (#18) --- src/range.rs | 5 +++++ 1 file changed, 5 insertions(+) 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 {