diff options
| author | Ralf Jung <post@ralfj.de> | 2020-05-24 16:51:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-24 16:51:36 +0200 |
| commit | 134a165b6c55bd16a0431749da12c3e75477cf63 (patch) | |
| tree | a1bf21792633a3c907a10b9f005020ea40bcfcbf | |
| parent | 67b4e2b3719e59604d559b21e6bcd31c8e100133 (diff) | |
| parent | df2f9a4bd11b2067379c0c97eca3a249fe67fc17 (diff) | |
| download | rust-134a165b6c55bd16a0431749da12c3e75477cf63.tar.gz rust-134a165b6c55bd16a0431749da12c3e75477cf63.zip | |
Rollup merge of #72535 - saschanaz:patch-1, r=jonas-schievink
Use sort_unstable_by in its own docs Currently it uses `sort_by` instead of itself.
| -rw-r--r-- | src/libcore/slice/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index b5ce165cb43..2361749f166 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1654,7 +1654,7 @@ impl<T> [T] { /// /// ``` /// let mut floats = [5f64, 4.0, 1.0, 3.0, 2.0]; - /// floats.sort_by(|a, b| a.partial_cmp(b).unwrap()); + /// floats.sort_unstable_by(|a, b| a.partial_cmp(b).unwrap()); /// assert_eq!(floats, [1.0, 2.0, 3.0, 4.0, 5.0]); /// ``` /// |
