mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Simplify FullInt Ord impl
This commit is contained in:
parent
c8edd9a16e
commit
c6dca68eca
1 changed files with 5 additions and 5 deletions
|
@ -253,11 +253,11 @@ impl PartialOrd for FullInt {
|
|||
impl Ord for FullInt {
|
||||
#[must_use]
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
match (self, other) {
|
||||
(&Self::S(s), &Self::S(o)) => s.cmp(&o),
|
||||
(&Self::U(s), &Self::U(o)) => s.cmp(&o),
|
||||
(&Self::S(s), &Self::U(o)) => Self::cmp_s_u(s, o),
|
||||
(&Self::U(s), &Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
|
||||
match (*self, *other) {
|
||||
(Self::S(s), Self::S(o)) => s.cmp(&o),
|
||||
(Self::U(s), Self::U(o)) => s.cmp(&o),
|
||||
(Self::S(s), Self::U(o)) => Self::cmp_s_u(s, o),
|
||||
(Self::U(s), Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue