Unnamed repository; edit this file 'description' to name the repository.
clippy: Enable `non_canonical_partial_ord_impl` rule
Tetsuharu Ohzeki 2024-02-09
parent 2601d19 · commit 1e4171b
-rw-r--r--Cargo.toml1
-rw-r--r--lib/la-arena/src/lib.rs2
2 files changed, 1 insertions, 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<T> Ord for Idx<T> {
impl<T> PartialOrd for Idx<T> {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
- self.raw.partial_cmp(&other.raw)
+ Some(self.cmp(other))
}
}