From 1e4171bc6e4c47de88eb98f44837a733ef53ce57 Mon Sep 17 00:00:00 2001 From: Tetsuharu Ohzeki Date: Fri, 9 Feb 2024 22:42:16 +0900 Subject: [PATCH] clippy: Enable `non_canonical_partial_ord_impl` rule --- Cargo.toml | 1 - lib/la-arena/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c8adf18a8c..8bec3893ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,7 +172,6 @@ borrowed_box = "allow" derived_hash_with_manual_eq = "allow" forget_non_drop = "allow" needless_doctest_main = "allow" -non_canonical_partial_ord_impl = "allow" too_many_arguments = "allow" type_complexity = "allow" wrong_self_convention = "allow" diff --git a/lib/la-arena/src/lib.rs b/lib/la-arena/src/lib.rs index 1ded3b00a6..abde5deda4 100644 --- a/lib/la-arena/src/lib.rs +++ b/lib/la-arena/src/lib.rs @@ -70,7 +70,7 @@ impl Ord for Idx { impl PartialOrd for Idx { fn partial_cmp(&self, other: &Self) -> Option { - self.raw.partial_cmp(&other.raw) + Some(self.cmp(other)) } }