From b3a273d5d33edf87392064a98282df9122536167 Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Fri, 16 Aug 2024 19:51:20 -0400 Subject: [PATCH] consistency between `Range::iter` and `Range::bounding_range` --- src/range.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/range.rs b/src/range.rs index aca8655e..6f92477f 100644 --- a/src/range.rs +++ b/src/range.rs @@ -685,8 +685,10 @@ impl Range { } /// Iterate over the parts of the range. - pub fn iter(&self) -> impl Iterator, &Bound)> { - self.segments.iter().map(|(start, end)| (start, end)) + pub fn iter(&self) -> impl Iterator, Bound<&V>)> { + self.segments + .iter() + .map(|(start, end)| (start.as_ref(), end.as_ref())) } }