Skip to content

Commit

Permalink
Fixes the new deny-by-default incorrect_partial_ord_impl_on_ord_type …
Browse files Browse the repository at this point in the history
…Clippy lint
  • Loading branch information
adamreichold committed Jul 20, 2023
1 parent 820f126 commit 76a254c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ impl Ord for BlankRange {
}
impl PartialOrd for BlankRange {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
Some(self.blank_size().cmp(&other.blank_size()))
Some(self.cmp(other))
}
}
2 changes: 1 addition & 1 deletion src/query/more_like_this/more_like_this.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Eq for ScoreTerm {}

impl PartialOrd for ScoreTerm {
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
self.score.partial_cmp(&other.score)
Some(self.cmp(other))
}
}

Expand Down
2 changes: 1 addition & 1 deletion sstable/src/merge/heap_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl<B: AsRef<[u8]>> Ord for HeapItem<B> {
}
impl<B: AsRef<[u8]>> PartialOrd for HeapItem<B> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(other.0.as_ref().cmp(self.0.as_ref()))
Some(self.cmp(other))
}
}

Expand Down

0 comments on commit 76a254c

Please sign in to comment.