Skip to content

Commit c6dca68

Browse files
author
Michael Wright
committed
Simplify FullInt Ord impl
1 parent c8edd9a commit c6dca68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clippy_utils/src/consts.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ impl PartialOrd for FullInt {
253253
impl Ord for FullInt {
254254
#[must_use]
255255
fn cmp(&self, other: &Self) -> Ordering {
256-
match (self, other) {
257-
(&Self::S(s), &Self::S(o)) => s.cmp(&o),
258-
(&Self::U(s), &Self::U(o)) => s.cmp(&o),
259-
(&Self::S(s), &Self::U(o)) => Self::cmp_s_u(s, o),
260-
(&Self::U(s), &Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
256+
match (*self, *other) {
257+
(Self::S(s), Self::S(o)) => s.cmp(&o),
258+
(Self::U(s), Self::U(o)) => s.cmp(&o),
259+
(Self::S(s), Self::U(o)) => Self::cmp_s_u(s, o),
260+
(Self::U(s), Self::S(o)) => Self::cmp_s_u(o, s).reverse(),
261261
}
262262
}
263263
}

0 commit comments

Comments
 (0)