@@ -3070,7 +3070,8 @@ impl<T> [T] {
30703070 }
30713071
30723072 /// Reorders the slice such that the element at `index` is at a sort-order position. All
3073- /// elements before `index` will be `<=` to this value, and all elements after will be `>=` to it.
3073+ /// elements before `index` will be `<=` to this value, and all elements after will be `>=` to
3074+ /// it.
30743075 ///
30753076 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
30763077 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
@@ -3079,7 +3080,9 @@ impl<T> [T] {
30793080 /// Returns a triple that partitions the reordered slice:
30803081 ///
30813082 /// * The unsorted subslice before `index`, whose elements all satisfy `x <= self[index]`.
3083+ ///
30823084 /// * The element at `index`.
3085+ ///
30833086 /// * The unsorted subslice after `index`, whose elements all satisfy `x >= self[index]`.
30843087 ///
30853088 /// # Current implementation
@@ -3129,18 +3132,22 @@ impl<T> [T] {
31293132 }
31303133
31313134 /// Reorders the slice with a comparator function such that the element at `index` is at a
3132- /// sort-order position. All elements before `index` will be `<=` to this value, and all elements
3133- /// after will be `>=` to it, according to the comparator function.
3135+ /// sort-order position. All elements before `index` will be `<=` to this value, and all
3136+ /// elements after will be `>=` to it, according to the comparator function.
31343137 ///
31353138 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
31363139 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
31373140 /// function is also known as "kth element" in other libraries.
31383141 ///
31393142 /// Returns a triple partitioning the reordered slice:
31403143 ///
3141- /// * The unsorted subslice before `index`, whose elements all satisfy `compare(x, self[index]).is_le()`.
3144+ /// * The unsorted subslice before `index`, whose elements all satisfy
3145+ /// `compare(x, self[index]).is_le()`.
3146+ ///
31423147 /// * The element at `index`.
3143- /// * The unsorted subslice after `index`, whose elements all satisfy `compare(x, self[index]).is_ge()`.
3148+ ///
3149+ /// * The unsorted subslice after `index`, whose elements all satisfy
3150+ /// `compare(x, self[index]).is_ge()`.
31443151 ///
31453152 /// # Current implementation
31463153 ///
@@ -3194,8 +3201,8 @@ impl<T> [T] {
31943201 }
31953202
31963203 /// Reorders the slice with a key extraction function such that the element at `index` is at a
3197- /// sort-order position. All elements before `index` will have keys `<=` to the key at `index`, and
3198- /// all elements after will have keys `>=` to it.
3204+ /// sort-order position. All elements before `index` will have keys `<=` to the key at `index`,
3205+ /// and all elements after will have keys `>=` to it.
31993206 ///
32003207 /// This reordering is unstable (i.e. any element that compares equal to the nth element may end
32013208 /// up at that position), in-place (i.e. does not allocate), and runs in *O*(*n*) time. This
@@ -3204,7 +3211,9 @@ impl<T> [T] {
32043211 /// Returns a triple partitioning the reordered slice:
32053212 ///
32063213 /// * The unsorted subslice before `index`, whose elements all satisfy `f(x) <= f(self[index])`.
3214+ ///
32073215 /// * The element at `index`.
3216+ ///
32083217 /// * The unsorted subslice after `index`, whose elements all satisfy `f(x) >= f(self[index])`.
32093218 ///
32103219 /// # Current implementation
@@ -3227,7 +3236,8 @@ impl<T> [T] {
32273236 /// ```
32283237 /// let mut v = [-5i32, 4, 1, -3, 2];
32293238 ///
3230- /// // Find the items `<=` to the absolute median, the absolute median itself, and the items `>=` to it.
3239+ /// // Find the items `<=` to the absolute median, the absolute median itself, and the items
3240+ /// // `>=` to it.
32313241 /// let (lesser, median, greater) = v.select_nth_unstable_by_key(2, |a| a.abs());
32323242 ///
32333243 /// assert!(lesser == [1, 2] || lesser == [2, 1]);
0 commit comments