@@ -2086,10 +2086,10 @@ pub trait Iterator {
2086
2086
#[ inline]
2087
2087
fn check < T > ( mut f : impl FnMut ( T ) -> bool ) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) , ( ) > {
2088
2088
move |( ) , x| {
2089
- if f ( x) { ControlFlow :: Continue ( ( ) ) } else { ControlFlow :: Break ( ( ) ) }
2089
+ if f ( x) { ControlFlow :: CONTINUE } else { ControlFlow :: BREAK }
2090
2090
}
2091
2091
}
2092
- self . try_fold ( ( ) , check ( f) ) == ControlFlow :: Continue ( ( ) )
2092
+ self . try_fold ( ( ) , check ( f) ) == ControlFlow :: CONTINUE
2093
2093
}
2094
2094
2095
2095
/// Tests if any element of the iterator matches a predicate.
@@ -2139,11 +2139,11 @@ pub trait Iterator {
2139
2139
#[ inline]
2140
2140
fn check < T > ( mut f : impl FnMut ( T ) -> bool ) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) , ( ) > {
2141
2141
move |( ) , x| {
2142
- if f ( x) { ControlFlow :: Break ( ( ) ) } else { ControlFlow :: Continue ( ( ) ) }
2142
+ if f ( x) { ControlFlow :: BREAK } else { ControlFlow :: CONTINUE }
2143
2143
}
2144
2144
}
2145
2145
2146
- self . try_fold ( ( ) , check ( f) ) == ControlFlow :: Break ( ( ) )
2146
+ self . try_fold ( ( ) , check ( f) ) == ControlFlow :: BREAK
2147
2147
}
2148
2148
2149
2149
/// Searches for an element of an iterator that satisfies a predicate.
@@ -2201,7 +2201,7 @@ pub trait Iterator {
2201
2201
mut predicate : impl FnMut ( & T ) -> bool ,
2202
2202
) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) , T > {
2203
2203
move |( ) , x| {
2204
- if predicate ( & x) { ControlFlow :: Break ( x) } else { ControlFlow :: Continue ( ( ) ) }
2204
+ if predicate ( & x) { ControlFlow :: Break ( x) } else { ControlFlow :: CONTINUE }
2205
2205
}
2206
2206
}
2207
2207
@@ -2236,7 +2236,7 @@ pub trait Iterator {
2236
2236
) -> impl FnMut ( ( ) , T ) -> ControlFlow < ( ) , B > {
2237
2237
move |( ) , x| match f ( x) {
2238
2238
Some ( x) => ControlFlow :: Break ( x) ,
2239
- None => ControlFlow :: Continue ( ( ) ) ,
2239
+ None => ControlFlow :: CONTINUE ,
2240
2240
}
2241
2241
}
2242
2242
@@ -2278,7 +2278,7 @@ pub trait Iterator {
2278
2278
R : Try < Ok = bool > ,
2279
2279
{
2280
2280
move |( ) , x| match f ( & x) . into_result ( ) {
2281
- Ok ( false ) => ControlFlow :: Continue ( ( ) ) ,
2281
+ Ok ( false ) => ControlFlow :: CONTINUE ,
2282
2282
Ok ( true ) => ControlFlow :: Break ( Ok ( x) ) ,
2283
2283
Err ( x) => ControlFlow :: Break ( Err ( x) ) ,
2284
2284
}
0 commit comments