@@ -238,9 +238,9 @@ impl<V: Ord> Range<V> {
238238 /// The `versions` iterator must be sorted.
239239 /// Functionally equivalent to `versions.map(|v| self.contains(v))`.
240240 /// Except it runs in `O(size_of_range + len_of_versions)` not `O(size_of_range * len_of_versions)`
241- pub fn contains_many < ' s , I , BV > ( & ' s self , versions : I ) -> impl Iterator < Item = bool > + ' s
241+ pub fn contains_many < ' s , I , BV > ( & ' s self , versions : I ) -> impl Iterator < Item = bool > + ' s
242242 where
243- I : Iterator < Item = BV > + ' s ,
243+ I : Iterator < Item = BV > + ' s ,
244244 BV : Borrow < V > + ' s ,
245245 {
246246 #[ cfg( debug_assertions) ]
@@ -310,7 +310,7 @@ impl<V: Ord> Range<V> {
310310
311311/// Implementing `PartialOrd` for start `Bound` of an interval.
312312///
313- /// Legend: `∞` is unbounded, `[1,2]` is `>1,<2`, `]1,2[` is `>= 1,<= 2`.
313+ /// Legend: `∞` is unbounded, `[1,2]` is `>= 1,<= 2`, `]1,2[` is `>1,<2`.
314314///
315315/// ```text
316316/// left: ∞-------]
@@ -347,7 +347,7 @@ fn cmp_bounds_start<V: PartialOrd>(left: Bound<&V>, right: Bound<&V>) -> Option<
347347///
348348/// We flip the unbounded ranges from `-∞` to `∞`, while `V`-valued bounds checks remain the same.
349349///
350- /// Legend: `∞` is unbounded, `[1,2]` is `>1,<2`, `]1,2[` is `>= 1,<= 2`.
350+ /// Legend: `∞` is unbounded, `[1,2]` is `>= 1,<= 2`, `]1,2[` is `>1,<2`.
351351///
352352/// ```text
353353/// left: [--------∞
@@ -503,8 +503,8 @@ fn left_end_is_smaller<V: PartialOrd>(left: Bound<V>, right: Bound<V>) -> bool {
503503/// [None, 1, 4, 7, None, None, None, 8, None, 9] -> [(1, 7), (8, 8), (9, None)]
504504/// ```
505505fn group_adjacent_locations (
506- mut locations : impl Iterator < Item = Option < usize > > ,
507- ) -> impl Iterator < Item = ( Option < usize > , Option < usize > ) > {
506+ mut locations : impl Iterator < Item = Option < usize > > ,
507+ ) -> impl Iterator < Item = ( Option < usize > , Option < usize > ) > {
508508 // If the first version matched, then the lower bound of that segment is not needed
509509 let mut seg = locations. next ( ) . flatten ( ) . map ( |ver| ( None , Some ( ver) ) ) ;
510510 std:: iter:: from_fn ( move || {
@@ -720,7 +720,7 @@ impl<V: Ord + Clone> Range<V> {
720720 /// If the given versions are not sorted the correctness of this function is not guaranteed.
721721 pub fn simplify < ' s , I , BV > ( & self , versions : I ) -> Self
722722 where
723- I : Iterator < Item = BV > + ' s ,
723+ I : Iterator < Item = BV > + ' s ,
724724 BV : Borrow < V > + ' s ,
725725 {
726726 // Do not simplify singletons
@@ -770,7 +770,7 @@ impl<V: Ord + Clone> Range<V> {
770770 /// start of the first and the end of the second.
771771 fn keep_segments (
772772 & self ,
773- kept_segments : impl Iterator < Item = ( Option < usize > , Option < usize > ) > ,
773+ kept_segments : impl Iterator < Item = ( Option < usize > , Option < usize > ) > ,
774774 ) -> Range < V > {
775775 let mut segments = SmallVec :: Empty ;
776776 for ( s, e) in kept_segments {
@@ -783,7 +783,7 @@ impl<V: Ord + Clone> Range<V> {
783783 }
784784
785785 /// Iterate over the parts of the range.
786- pub fn iter ( & self ) -> impl Iterator < Item = ( & Bound < V > , & Bound < V > ) > {
786+ pub fn iter ( & self ) -> impl Iterator < Item = ( & Bound < V > , & Bound < V > ) > {
787787 self . segments . iter ( ) . map ( |( start, end) | ( start, end) )
788788 }
789789}
@@ -903,7 +903,7 @@ pub mod tests {
903903
904904 /// Generate version sets from a random vector of deltas between bounds.
905905 /// Each bound is randomly inclusive or exclusive.
906- pub fn strategy ( ) -> impl Strategy < Value = Range < u32 > > {
906+ pub fn strategy ( ) -> impl Strategy < Value = Range < u32 > > {
907907 (
908908 any :: < bool > ( ) ,
909909 prop:: collection:: vec ( any :: < ( u32 , bool ) > ( ) , 1 ..10 ) ,
@@ -965,7 +965,7 @@ pub mod tests {
965965 } )
966966 }
967967
968- fn version_strat ( ) -> impl Strategy < Value = u32 > {
968+ fn version_strat ( ) -> impl Strategy < Value = u32 > {
969969 any :: < u32 > ( )
970970 }
971971
0 commit comments