Skip to content

Commit 674ba3b

Browse files
oxadejonas-lj
authored andcommitted
chore/easy: ord clippy lint (MystenLabs#14356)
## Description This is the last cleanup for the outstanding lints from MystenLabs#14167 In order to preserve existing behavior, it was easier to selectively ignore the lints on specific files. ## Test Plan Existing --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
1 parent 4c250ff commit 674ba3b

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

.cargo/config

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ move-clippy = [
2222
"-Aclippy::new_without_default",
2323
"-Aclippy::box_default",
2424
"-Aclippy::manual_slice_size_calculation",
25-
"-Aclippy::incorrect_partial_ord_impl_on_ord_type",
2625
]
2726

2827
[build]

external-crates/move/move-analyzer/src/symbols.rs

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
//! definitions, the symbolicator builds a scope stack, entering encountered definitions and
4747
//! matching uses to a definition in the innermost scope.
4848
49+
#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
50+
4951
use crate::{
5052
context::Context,
5153
diagnostics::{lsp_diagnostics, lsp_empty_diagnostics},
@@ -167,6 +169,7 @@ struct StructDef {
167169
field_defs: Vec<FieldDef>,
168170
}
169171

172+
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
170173
#[derive(Derivative, Debug, Clone, PartialEq, Eq)]
171174
#[derivative(PartialOrd, Ord)]
172175
pub struct FunctionDef {

external-crates/move/move-borrow-graph/src/references.rs

+1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ impl<Loc: Copy, Lbl: Clone + Ord> PartialEq for BorrowEdge<Loc, Lbl> {
209209

210210
impl<Loc: Copy, Lbl: Clone + Ord> Eq for BorrowEdge<Loc, Lbl> {}
211211

212+
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
212213
impl<Loc: Copy, Lbl: Clone + Ord> PartialOrd for BorrowEdge<Loc, Lbl> {
213214
fn partial_cmp(&self, other: &BorrowEdge<Loc, Lbl>) -> Option<Ordering> {
214215
BorrowEdgeNoLoc::new(self).partial_cmp(&BorrowEdgeNoLoc::new(other))

external-crates/move/move-compiler/src/shared/unique_set.rs

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ impl<T: TName> PartialEq for UniqueSet<T> {
117117
}
118118
impl<T: TName> Eq for UniqueSet<T> {}
119119

120+
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
120121
impl<T: TName> PartialOrd for UniqueSet<T> {
121122
fn partial_cmp(&self, other: &UniqueSet<T>) -> Option<Ordering> {
122123
(self.0).0.keys().partial_cmp((other.0).0.keys())

external-crates/move/move-core/types/src/gas_algebra.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl<U> Eq for GasQuantity<U> {}
177177

178178
impl<U> PartialOrd for GasQuantity<U> {
179179
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
180-
Some(self.cmp_impl(other))
180+
Some(std::cmp::Ord::cmp(self, other))
181181
}
182182
}
183183

0 commit comments

Comments
 (0)