about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Wright <mikerite@lavabit.com>2021-10-30 06:22:19 +0200
committerMichael Wright <mikerite@lavabit.com>2021-10-30 06:22:19 +0200
commitc6dca68eca75a46af31d7175486909c720c2aebc (patch)
tree329b6018ac29c49ed1ca680f58dc42f9a548c498
parentc8edd9a16e2e9db1fa2f26a0164740ae426f4876 (diff)
downloadrust-c6dca68eca75a46af31d7175486909c720c2aebc.tar.gz
rust-c6dca68eca75a46af31d7175486909c720c2aebc.zip
Simplify FullInt Ord impl
-rw-r--r--clippy_utils/src/consts.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_utils/src/consts.rs b/clippy_utils/src/consts.rs
index 85dad1dcfb2..7ce9676ed05 100644
--- a/clippy_utils/src/consts.rs
+++ b/clippy_utils/src/consts.rs
@@ -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(),
         }
     }
 }