@@ -3072,7 +3072,8 @@ impl<T> [T] {
30723072 }
30733073
30743074 /// Reorders the slice such that the element at `index` is at a sort-order position. All
3075- /// elements before `index` will be `<=` to this value, and all elements after will be `>=` to it.
3075+ /// elements before `index` will be `<=` to this value, and all elements after will be `>=` to
3076+ /// it.
30763077 ///
30773078 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
30783079 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
@@ -3081,7 +3082,9 @@ impl<T> [T] {
30813082 /// Returns a triple that partitions the reordered slice:
30823083 ///
30833084 /// * The unsorted subslice before `index`, whose elements all satisfy `x <= self[index]`.
3085+ ///
30843086 /// * The element at `index`.
3087+ ///
30853088 /// * The unsorted subslice after `index`, whose elements all satisfy `x >= self[index]`.
30863089 ///
30873090 /// # Current implementation
@@ -3131,18 +3134,22 @@ impl<T> [T] {
31313134 }
31323135
31333136 /// Reorders the slice with a comparator function such that the element at `index` is at a
3134- /// sort-order position. All elements before `index` will be `<=` to this value, and all elements
3135- /// after will be `>=` to it, according to the comparator function.
3137+ /// sort-order position. All elements before `index` will be `<=` to this value, and all
3138+ /// elements after will be `>=` to it, according to the comparator function.
31363139 ///
31373140 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
31383141 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
31393142 /// function is also known as "kth element" in other libraries.
31403143 ///
31413144 /// Returns a triple partitioning the reordered slice:
31423145 ///
3143- /// * The unsorted subslice before `index`, whose elements all satisfy `compare(x, self[index]).is_le()`.
3146+ /// * The unsorted subslice before `index`, whose elements all satisfy
3147+ /// `compare(x, self[index]).is_le()`.
3148+ ///
31443149 /// * The element at `index`.
3145- /// * The unsorted subslice after `index`, whose elements all satisfy `compare(x, self[index]).is_ge()`.
3150+ ///
3151+ /// * The unsorted subslice after `index`, whose elements all satisfy
3152+ /// `compare(x, self[index]).is_ge()`.
31463153 ///
31473154 /// # Current implementation
31483155 ///
@@ -3196,8 +3203,8 @@ impl<T> [T] {
31963203 }
31973204
31983205 /// Reorders the slice with a key extraction function such that the element at `index` is at a
3199- /// sort-order position. All elements before `index` will have keys `<=` to the key at `index`, and
3200- /// all elements after will have keys `>=` to it.
3206+ /// sort-order position. All elements before `index` will have keys `<=` to the key at `index`,
3207+ /// and all elements after will have keys `>=` to it.
32013208 ///
32023209 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
32033210 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
@@ -3206,7 +3213,9 @@ impl<T> [T] {
32063213 /// Returns a triple partitioning the reordered slice:
32073214 ///
32083215 /// * The unsorted subslice before `index`, whose elements all satisfy `f(x) <= f(self[index])`.
3216+ ///
32093217 /// * The element at `index`.
3218+ ///
32103219 /// * The unsorted subslice after `index`, whose elements all satisfy `f(x) >= f(self[index])`.
32113220 ///
32123221 /// # Current implementation
@@ -3229,7 +3238,8 @@ impl<T> [T] {
32293238 /// ```
32303239 /// let mut v = [-5i32, 4, 1, -3, 2];
32313240 ///
3232- /// // Find the items `<=` to the absolute median, the absolute median itself, and the items `>=` to it.
3241+ /// // Find the items `<=` to the absolute median, the absolute median itself, and the items
3242+ /// // `>=` to it.
32333243 /// let (lesser, median, greater) = v.select_nth_unstable_by_key(2, |a| a.abs());
32343244 ///
32353245 /// assert!(lesser == [1, 2] || lesser == [2, 1]);
0 commit comments