]> git.lizzy.rs Git - rust.git/commit
Doc total order requirement of sort(_unstable)_by
authorHavvy (Ryan Scheel) <ryan.havvy@gmail.com>
Mon, 3 Sep 2018 05:26:38 +0000 (22:26 -0700)
committerHavvy (Ryan Scheel) <ryan.havvy@gmail.com>
Sat, 6 Oct 2018 00:41:42 +0000 (17:41 -0700)
commit7e57f0a6a8fd4e5df7890613918f4a2c3b5a1fb7
treee6d48391a1441a47aeac1a7b5ce6fcddbb691deb
parentb8bea5a0a6aef3966008787a25949344f8cf6942
Doc total order requirement of sort(_unstable)_by

I took the definition of what a total order is from the Ord trait
docs. I specifically put "elements of the slice" because if you
have a slice of f64s, but know none are NaN, then sorting by
partial ord is total in this case. I'm not sure if I should give
such an example in the docs or not.
src/liballoc/slice.rs
src/libcore/slice/mod.rs