impartial-ord 1.0.0

Derives a quicker PartialOrd for types that already implement Ord
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[![crates.io badge](https://img.shields.io/crates/v/impartial-ord)](https://crates.io/crates/impartial-ord)

Derives a quicker `PartialOrd` for types that already implement `Ord`.

```rust
// Input
#[derive(PartialEq, Eq, Ord, impartial_ord::ImpartialOrd)]
struct MyStruct;

// Output
impl PartialOrd for MyStruct {
    #[inline]
    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
        Some(Ord::cmp(self, other))
    }
}
```