@@ -2540,7 +2540,7 @@ impl<T> [T] {
25402540 where
25412541 T : Ord ,
25422542 {
2543- sort:: quicksort ( self , |a , b| a . lt ( b ) ) ;
2543+ sort:: quicksort ( self , T :: lt ) ;
25442544 }
25452545
25462546 /// Sorts the slice with a comparator function, but might not preserve the order of equal
@@ -2679,8 +2679,7 @@ impl<T> [T] {
26792679 where
26802680 T : Ord ,
26812681 {
2682- let mut f = |a : & T , b : & T | a. lt ( b) ;
2683- sort:: partition_at_index ( self , index, & mut f)
2682+ sort:: partition_at_index ( self , index, T :: lt)
26842683 }
26852684
26862685 /// Reorder the slice with a comparator function such that the element at `index` is at its
@@ -2731,8 +2730,7 @@ impl<T> [T] {
27312730 where
27322731 F : FnMut ( & T , & T ) -> Ordering ,
27332732 {
2734- let mut f = |a : & T , b : & T | compare ( a, b) == Less ;
2735- sort:: partition_at_index ( self , index, & mut f)
2733+ sort:: partition_at_index ( self , index, |a : & T , b : & T | compare ( a, b) == Less )
27362734 }
27372735
27382736 /// Reorder the slice with a key extraction function such that the element at `index` is at its
@@ -2784,8 +2782,7 @@ impl<T> [T] {
27842782 F : FnMut ( & T ) -> K ,
27852783 K : Ord ,
27862784 {
2787- let mut g = |a : & T , b : & T | f ( a) . lt ( & f ( b) ) ;
2788- sort:: partition_at_index ( self , index, & mut g)
2785+ sort:: partition_at_index ( self , index, |a : & T , b : & T | f ( a) . lt ( & f ( b) ) )
27892786 }
27902787
27912788 /// Moves all consecutive repeated elements to the end of the slice according to the
0 commit comments