@@ -2601,10 +2601,10 @@ pub trait Iterator {
2601
2601
#[ inline]
2602
2602
fn check < T > ( mut f : impl FnMut ( T ) -> bool ) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) > {
2603
2603
move |( ) , x| {
2604
- if f ( x) { ControlFlow :: CONTINUE } else { ControlFlow :: BREAK }
2604
+ if f ( x) { ControlFlow :: Continue ( ( ) ) } else { ControlFlow :: Break ( ( ) ) }
2605
2605
}
2606
2606
}
2607
- self . try_fold ( ( ) , check ( f) ) == ControlFlow :: CONTINUE
2607
+ self . try_fold ( ( ) , check ( f) ) == ControlFlow :: Continue ( ( ) )
2608
2608
}
2609
2609
2610
2610
/// Tests if any element of the iterator matches a predicate.
@@ -2654,11 +2654,11 @@ pub trait Iterator {
2654
2654
#[ inline]
2655
2655
fn check < T > ( mut f : impl FnMut ( T ) -> bool ) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) > {
2656
2656
move |( ) , x| {
2657
- if f ( x) { ControlFlow :: BREAK } else { ControlFlow :: CONTINUE }
2657
+ if f ( x) { ControlFlow :: Break ( ( ) ) } else { ControlFlow :: Continue ( ( ) ) }
2658
2658
}
2659
2659
}
2660
2660
2661
- self . try_fold ( ( ) , check ( f) ) == ControlFlow :: BREAK
2661
+ self . try_fold ( ( ) , check ( f) ) == ControlFlow :: Break ( ( ) )
2662
2662
}
2663
2663
2664
2664
/// Searches for an element of an iterator that satisfies a predicate.
@@ -2717,7 +2717,7 @@ pub trait Iterator {
2717
2717
#[ inline]
2718
2718
fn check < T > ( mut predicate : impl FnMut ( & T ) -> bool ) -> impl FnMut ( ( ) , T ) -> ControlFlow < T > {
2719
2719
move |( ) , x| {
2720
- if predicate ( & x) { ControlFlow :: Break ( x) } else { ControlFlow :: CONTINUE }
2720
+ if predicate ( & x) { ControlFlow :: Break ( x) } else { ControlFlow :: Continue ( ( ) ) }
2721
2721
}
2722
2722
}
2723
2723
@@ -2749,7 +2749,7 @@ pub trait Iterator {
2749
2749
fn check < T , B > ( mut f : impl FnMut ( T ) -> Option < B > ) -> impl FnMut ( ( ) , T ) -> ControlFlow < B > {
2750
2750
move |( ) , x| match f ( x) {
2751
2751
Some ( x) => ControlFlow :: Break ( x) ,
2752
- None => ControlFlow :: CONTINUE ,
2752
+ None => ControlFlow :: Continue ( ( ) ) ,
2753
2753
}
2754
2754
}
2755
2755
@@ -2812,7 +2812,7 @@ pub trait Iterator {
2812
2812
R : Residual < Option < I > > ,
2813
2813
{
2814
2814
move |( ) , x| match f ( & x) . branch ( ) {
2815
- ControlFlow :: Continue ( false ) => ControlFlow :: CONTINUE ,
2815
+ ControlFlow :: Continue ( false ) => ControlFlow :: Continue ( ( ) ) ,
2816
2816
ControlFlow :: Continue ( true ) => ControlFlow :: Break ( Try :: from_output ( Some ( x) ) ) ,
2817
2817
ControlFlow :: Break ( r) => ControlFlow :: Break ( FromResidual :: from_residual ( r) ) ,
2818
2818
}
@@ -3491,7 +3491,7 @@ pub trait Iterator {
3491
3491
F : FnMut ( X , Y ) -> Ordering ,
3492
3492
{
3493
3493
move |x, y| match cmp ( x, y) {
3494
- Ordering :: Equal => ControlFlow :: CONTINUE ,
3494
+ Ordering :: Equal => ControlFlow :: Continue ( ( ) ) ,
3495
3495
non_eq => ControlFlow :: Break ( non_eq) ,
3496
3496
}
3497
3497
}
@@ -3567,7 +3567,7 @@ pub trait Iterator {
3567
3567
F : FnMut ( X , Y ) -> Option < Ordering > ,
3568
3568
{
3569
3569
move |x, y| match partial_cmp ( x, y) {
3570
- Some ( Ordering :: Equal ) => ControlFlow :: CONTINUE ,
3570
+ Some ( Ordering :: Equal ) => ControlFlow :: Continue ( ( ) ) ,
3571
3571
non_eq => ControlFlow :: Break ( non_eq) ,
3572
3572
}
3573
3573
}
@@ -3625,7 +3625,7 @@ pub trait Iterator {
3625
3625
F : FnMut ( X , Y ) -> bool ,
3626
3626
{
3627
3627
move |x, y| {
3628
- if eq ( x, y) { ControlFlow :: CONTINUE } else { ControlFlow :: BREAK }
3628
+ if eq ( x, y) { ControlFlow :: Continue ( ( ) ) } else { ControlFlow :: Break ( ( ) ) }
3629
3629
}
3630
3630
}
3631
3631
@@ -3859,7 +3859,7 @@ pub trait Iterator {
3859
3859
3860
3860
/// Compares two iterators element-wise using the given function.
3861
3861
///
3862
- /// If `ControlFlow::CONTINUE ` is returned from the function, the comparison moves on to the next
3862
+ /// If `ControlFlow::Continue(()) ` is returned from the function, the comparison moves on to the next
3863
3863
/// elements of both iterators. Returning `ControlFlow::Break(x)` short-circuits the iteration and
3864
3864
/// returns `ControlFlow::Break(x)`. If one of the iterators runs out of elements,
3865
3865
/// `ControlFlow::Continue(ord)` is returned where `ord` is the result of comparing the lengths of
0 commit comments