1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Derives a quicker `PartialOrd` for types that already implement `Ord`.
//!
//! [](https://github.com/Alorel/impartial-ord-rs/actions/workflows/ci.yml?query=branch%3Amaster)
//! [](https://crates.io/crates/impartial-ord)
//! [](https://coveralls.io/github/Alorel/impartial-ord-rs)
//! [](https://libraries.io/cargo/impartial-ord)
//!
//! ```
//! # use core::cmp::{PartialOrd, Ord, Ordering};
//! # type Bar = u8;
//! # type Baz = u8;
//! #
//! #[derive(impartial_ord::ImpartialOrd, Ord, PartialEq, Eq, Default, Debug)]
//! struct MyStruct { foo: Bar, qux: Baz, }
//!
//! assert_eq!(MyStruct::default().partial_cmp(&MyStruct::default()), Some(Ordering::Equal));
//! ```
//!
//! ### Generated output
//!
//! ```
//! impl PartialOrd for MyStruct where Self: Ord {
//! #[inline]
//! fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
//! Some(Ord::cmp(self, other))
//! }
//! }
//! ````
//!
use quote;
use ;
/// A quicker [PartialOrd](core::cmp::PartialOrd) for types that already implement
/// [Ord](core::cmp::Ord). See [crate-level docs](crate).