Skip to content

Commit df2f9a4

Browse files
authored
Use sort_unstable_by in its own docs
1 parent 7726070 commit df2f9a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/libcore/slice/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,7 @@ impl<T> [T] {
16541654
///
16551655
/// ```
16561656
/// let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0];
1657-
/// floats.sort_by(|a, b| a.partial_cmp(b).unwrap());
1657+
/// floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap());
16581658
/// assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]);
16591659
/// ```
16601660
///

0 commit comments

Comments
 (0)