@@ -189,14 +189,14 @@ impl<T> [T] {
189
189
/// [`sort_unstable`](slice::sort_unstable). The exception are partially sorted slices, which
190
190
/// may be better served with `slice::sort`.
191
191
///
192
- /// Sorting types that only implement [`PartialOrd`] such as [`f32`] and [`f64`] requires
193
- /// additional precautions. For example Rust defines `NaN != NaN `, which doesn't fulfill the
194
- /// reflexivity requirement posed by [`Ord`]. By using an alternative comparison function with
192
+ /// Sorting types that only implement [`PartialOrd`] such as [`f32`] and [`f64`] require
193
+ /// additional precautions. For example, `f32::NAN != f32::NAN `, which doesn't fulfill the
194
+ /// reflexivity requirement of [`Ord`]. By using an alternative comparison function with
195
195
/// [`slice::sort_by`] such as [`f32::total_cmp`] or [`f64::total_cmp`] that defines a [total
196
- /// order] users can sort slices containing floating point numbers . Alternatively, if one can
197
- /// guarantee that all values in the slice are comparable with [`PartialOrd::partial_cmp`] *and*
198
- /// the implementation forms a [total order], it's possible to sort the slice with `sort_by(|a,
199
- /// b| a.partial_cmp(b).unwrap())`.
196
+ /// order] users can sort slices containing floating- point values . Alternatively, if all values
197
+ /// in the slice are guaranteed to be in a subset for which [`PartialOrd::partial_cmp`] forms a
198
+ /// [total order], it's possible to sort the slice with `sort_by(|a, b|
199
+ /// a.partial_cmp(b).unwrap())`.
200
200
///
201
201
/// # Current implementation
202
202
///
0 commit comments