@@ -2930,7 +2930,7 @@ pub trait Itertools : Iterator {
29302930 fn min_set ( self ) -> Vec < Self :: Item >
29312931 where Self : Sized , Self :: Item : Ord
29322932 {
2933- extrema_set:: min_set_impl ( self , |_| ( ) , |x, y, _, _| x < y )
2933+ extrema_set:: min_set_impl ( self , |_| ( ) , |x, y, _, _| x. cmp ( y ) )
29342934 }
29352935
29362936 /// Return all minimum elements of an iterator, as determined by
@@ -2964,7 +2964,7 @@ pub trait Itertools : Iterator {
29642964 extrema_set:: min_set_impl (
29652965 self ,
29662966 |_| ( ) ,
2967- |x, y, _, _| Ordering :: Less == compare ( x, y)
2967+ |x, y, _, _| compare ( x, y)
29682968 )
29692969 }
29702970
@@ -2995,7 +2995,7 @@ pub trait Itertools : Iterator {
29952995 fn min_set_by_key < K , F > ( self , key : F ) -> Vec < Self :: Item >
29962996 where Self : Sized , K : Ord , F : FnMut ( & Self :: Item ) -> K
29972997 {
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 ) )
29992999 }
30003000
30013001 /// Return all maximum elements of an iterator.
@@ -3024,7 +3024,7 @@ pub trait Itertools : Iterator {
30243024 fn max_set ( self ) -> Vec < Self :: Item >
30253025 where Self : Sized , Self :: Item : Ord
30263026 {
3027- extrema_set:: max_set_impl ( self , |_| ( ) , |x, y, _, _| x < y )
3027+ extrema_set:: max_set_impl ( self , |_| ( ) , |x, y, _, _| x. cmp ( y ) )
30283028 }
30293029
30303030 /// Return all maximum elements of an iterator, as determined by
@@ -3058,7 +3058,7 @@ pub trait Itertools : Iterator {
30583058 extrema_set:: max_set_impl (
30593059 self ,
30603060 |_| ( ) ,
3061- |x, y, _, _| Ordering :: Less == compare ( x, y)
3061+ |x, y, _, _| compare ( x, y)
30623062 )
30633063 }
30643064
@@ -3089,7 +3089,7 @@ pub trait Itertools : Iterator {
30893089 fn max_set_by_key < K , F > ( self , key : F ) -> Vec < Self :: Item >
30903090 where Self : Sized , K : Ord , F : FnMut ( & Self :: Item ) -> K
30913091 {
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 ) )
30933093 }
30943094
30953095 /// Return the minimum and maximum elements in the iterator.
0 commit comments