We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6dca68 commit 4a86156Copy full SHA for 4a86156
clippy_utils/src/consts.rs
@@ -253,11 +253,13 @@ impl PartialOrd for FullInt {
253
impl Ord for FullInt {
254
#[must_use]
255
fn cmp(&self, other: &Self) -> Ordering {
256
+ use FullInt::{S, U};
257
+
258
match (*self, *other) {
- (Self::S(s), Self::S(o)) => s.cmp(&o),
- (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(),
+ (S(s), S(o)) => s.cmp(&o),
+ (U(s), U(o)) => s.cmp(&o),
261
+ (S(s), U(o)) => Self::cmp_s_u(s, o),
262
+ (U(s), S(o)) => Self::cmp_s_u(o, s).reverse(),
263
}
264
265
0 commit comments