Skip to content

Commit 6925451

Browse files
committed
clippy
1 parent 5f39ad7 commit 6925451

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ast/value.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ impl PartialEq for ValueWithSpan {
4545
}
4646
}
4747

48-
impl PartialOrd for ValueWithSpan {
49-
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
50-
self.value.partial_cmp(&other.value)
51-
}
52-
}
53-
5448
impl Ord for ValueWithSpan {
5549
fn cmp(&self, other: &Self) -> core::cmp::Ordering {
5650
self.value.cmp(&other.value)
5751
}
5852
}
5953

54+
impl PartialOrd for ValueWithSpan {
55+
fn partial_cmp(&self, other: &Self) -> Option<core::cmp::Ordering> {
56+
Some(Ord::cmp(self, other))
57+
}
58+
}
59+
6060
impl core::hash::Hash for ValueWithSpan {
6161
fn hash<H: core::hash::Hasher>(&self, state: &mut H) {
6262
self.value.hash(state);

0 commit comments

Comments
 (0)