Skip to content

Commit

Permalink
Simplify FullInt Ord impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wright committed Oct 30, 2021
1 parent c8edd9a commit c6dca68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clippy_utils/src/consts.rs
Expand Up @@ -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(),
}
}
}
Expand Down

0 comments on commit c6dca68

Please sign in to comment.