By the way, clippy has a lint for this kind of bug:
error: you are implementing `Ord` explicitly but have derived `PartialOrd`
--> src/lib.rs:5:1
|
5 | / impl Ord for SortF32 {
6 | | #[inline(always)]
7 | | fn cmp(&self, other: &Self) -> std::cmp::Ordering {
8 | | self.0.total_cmp(&other.0)
9 | | }
10 | | }
| |_^
|
note: `PartialOrd` implemented here
--> src/lib.rs:1:41
|
1 | #[derive(Copy, Clone, Debug, PartialEq, PartialOrd)]
| ^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
= note: `#[deny(clippy::derive_ord_xor_partial_ord)]` on by default
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)