diff --git a/columnar/src/column_values/u128_based/compact_space/blank_range.rs b/columnar/src/column_values/u128_based/compact_space/blank_range.rs index a1f265f00d..4d1ceefd59 100644 --- a/columnar/src/column_values/u128_based/compact_space/blank_range.rs +++ b/columnar/src/column_values/u128_based/compact_space/blank_range.rs @@ -38,6 +38,6 @@ impl Ord for BlankRange { } impl PartialOrd for BlankRange { fn partial_cmp(&self, other: &Self) -> Option { - Some(self.blank_size().cmp(&other.blank_size())) + Some(self.cmp(other)) } } diff --git a/src/query/more_like_this/more_like_this.rs b/src/query/more_like_this/more_like_this.rs index ca86c70b16..4f94319f14 100644 --- a/src/query/more_like_this/more_like_this.rs +++ b/src/query/more_like_this/more_like_this.rs @@ -23,13 +23,15 @@ impl Eq for ScoreTerm {} impl PartialOrd for ScoreTerm { fn partial_cmp(&self, other: &Self) -> Option { - self.score.partial_cmp(&other.score) + Some(self.cmp(other)) } } impl Ord for ScoreTerm { fn cmp(&self, other: &Self) -> std::cmp::Ordering { - self.partial_cmp(other).unwrap_or(std::cmp::Ordering::Equal) + self.score + .partial_cmp(&other.score) + .unwrap_or(std::cmp::Ordering::Equal) } } diff --git a/sstable/src/merge/heap_merge.rs b/sstable/src/merge/heap_merge.rs index 39840b0881..e1742f91c9 100644 --- a/sstable/src/merge/heap_merge.rs +++ b/sstable/src/merge/heap_merge.rs @@ -15,7 +15,7 @@ impl> Ord for HeapItem { } impl> PartialOrd for HeapItem { fn partial_cmp(&self, other: &Self) -> Option { - Some(other.0.as_ref().cmp(self.0.as_ref())) + Some(self.cmp(other)) } }