@@ -2930,7 +2930,7 @@ pub trait Itertools : Iterator {
2930
2930
fn min_set ( self ) -> Vec < Self :: Item >
2931
2931
where Self : Sized , Self :: Item : Ord
2932
2932
{
2933
- extrema_set:: min_set_impl ( self , |_| ( ) , |x, y, _, _| x < y )
2933
+ extrema_set:: min_set_impl ( self , |_| ( ) , |x, y, _, _| x. cmp ( y ) )
2934
2934
}
2935
2935
2936
2936
/// Return all minimum elements of an iterator, as determined by
@@ -2964,7 +2964,7 @@ pub trait Itertools : Iterator {
2964
2964
extrema_set:: min_set_impl (
2965
2965
self ,
2966
2966
|_| ( ) ,
2967
- |x, y, _, _| Ordering :: Less == compare ( x, y)
2967
+ |x, y, _, _| compare ( x, y)
2968
2968
)
2969
2969
}
2970
2970
@@ -2995,7 +2995,7 @@ pub trait Itertools : Iterator {
2995
2995
fn min_set_by_key < K , F > ( self , key : F ) -> Vec < Self :: Item >
2996
2996
where Self : Sized , K : Ord , F : FnMut ( & Self :: Item ) -> K
2997
2997
{
2998
- extrema_set:: min_set_impl ( self , key, |_, _, kx, ky| kx < ky )
2998
+ extrema_set:: min_set_impl ( self , key, |_, _, kx, ky| kx. cmp ( ky ) )
2999
2999
}
3000
3000
3001
3001
/// Return all maximum elements of an iterator.
@@ -3024,7 +3024,7 @@ pub trait Itertools : Iterator {
3024
3024
fn max_set ( self ) -> Vec < Self :: Item >
3025
3025
where Self : Sized , Self :: Item : Ord
3026
3026
{
3027
- extrema_set:: max_set_impl ( self , |_| ( ) , |x, y, _, _| x < y )
3027
+ extrema_set:: max_set_impl ( self , |_| ( ) , |x, y, _, _| x. cmp ( y ) )
3028
3028
}
3029
3029
3030
3030
/// Return all maximum elements of an iterator, as determined by
@@ -3058,7 +3058,7 @@ pub trait Itertools : Iterator {
3058
3058
extrema_set:: max_set_impl (
3059
3059
self ,
3060
3060
|_| ( ) ,
3061
- |x, y, _, _| Ordering :: Less == compare ( x, y)
3061
+ |x, y, _, _| compare ( x, y)
3062
3062
)
3063
3063
}
3064
3064
@@ -3089,7 +3089,7 @@ pub trait Itertools : Iterator {
3089
3089
fn max_set_by_key < K , F > ( self , key : F ) -> Vec < Self :: Item >
3090
3090
where Self : Sized , K : Ord , F : FnMut ( & Self :: Item ) -> K
3091
3091
{
3092
- extrema_set:: max_set_impl ( self , key, |_, _, kx, ky| kx < ky )
3092
+ extrema_set:: max_set_impl ( self , key, |_, _, kx, ky| kx. cmp ( ky ) )
3093
3093
}
3094
3094
3095
3095
/// Return the minimum and maximum elements in the iterator.
0 commit comments