Do not fail sort comparisons when the field name or target point are different

This commit is contained in:
Louis Dureuil 2024-07-11 16:28:14 +02:00
parent 12a7a45930
commit 7fb3e378ff
No known key found for this signature in database

View File

@ -425,9 +425,6 @@ pub struct Sort {
impl PartialOrd for Sort { impl PartialOrd for Sort {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
if self.field_name != other.field_name {
return None;
}
if self.ascending != other.ascending { if self.ascending != other.ascending {
return None; return None;
} }
@ -466,9 +463,6 @@ pub struct GeoSort {
impl PartialOrd for GeoSort { impl PartialOrd for GeoSort {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
if self.target_point != other.target_point {
return None;
}
if self.ascending != other.ascending { if self.ascending != other.ascending {
return None; return None;
} }