@@ -3047,7 +3047,7 @@ impl<T> [T] {
3047
3047
sort:: quicksort ( self , |a, b| f ( a) . lt ( & f ( b) ) ) ;
3048
3048
}
3049
3049
3050
- /// Reorder the slice such that the element at `index` is at its final sorted position.
3050
+ /// Reorder the slice such that the element at `index` after the reordering is at its final sorted position.
3051
3051
///
3052
3052
/// This reordering has the additional property that any value at position `i < index` will be
3053
3053
/// less than or equal to any value at a position `j > index`. Additionally, this reordering is
@@ -3075,7 +3075,7 @@ impl<T> [T] {
3075
3075
/// # Examples
3076
3076
///
3077
3077
/// ```
3078
- /// let mut v = [-5i32, 4, 1 , -3, 2 ];
3078
+ /// let mut v = [-5i32, 4, 2 , -3, 1 ];
3079
3079
///
3080
3080
/// // Find the median
3081
3081
/// v.select_nth_unstable(2);
@@ -3096,8 +3096,8 @@ impl<T> [T] {
3096
3096
select:: partition_at_index ( self , index, T :: lt)
3097
3097
}
3098
3098
3099
- /// Reorder the slice with a comparator function such that the element at `index` is at its
3100
- /// final sorted position.
3099
+ /// Reorder the slice with a comparator function such that the element at `index` after the reordering is at
3100
+ /// its final sorted position.
3101
3101
///
3102
3102
/// This reordering has the additional property that any value at position `i < index` will be
3103
3103
/// less than or equal to any value at a position `j > index` using the comparator function.
@@ -3126,7 +3126,7 @@ impl<T> [T] {
3126
3126
/// # Examples
3127
3127
///
3128
3128
/// ```
3129
- /// let mut v = [-5i32, 4, 1 , -3, 2 ];
3129
+ /// let mut v = [-5i32, 4, 2 , -3, 1 ];
3130
3130
///
3131
3131
/// // Find the median as if the slice were sorted in descending order.
3132
3132
/// v.select_nth_unstable_by(2, |a, b| b.cmp(a));
@@ -3151,8 +3151,8 @@ impl<T> [T] {
3151
3151
select:: partition_at_index ( self , index, |a : & T , b : & T | compare ( a, b) == Less )
3152
3152
}
3153
3153
3154
- /// Reorder the slice with a key extraction function such that the element at `index` is at its
3155
- /// final sorted position.
3154
+ /// Reorder the slice with a key extraction function such that the element at `index` after the reordering is
3155
+ /// at its final sorted position.
3156
3156
///
3157
3157
/// This reordering has the additional property that any value at position `i < index` will be
3158
3158
/// less than or equal to any value at a position `j > index` using the key extraction function.
0 commit comments