diff --git a/src/server/actix_server/hpo_omims.rs b/src/server/actix_server/hpo_omims.rs index e08bbd4..f3e3983 100644 --- a/src/server/actix_server/hpo_omims.rs +++ b/src/server/actix_server/hpo_omims.rs @@ -77,11 +77,7 @@ impl Eq for ResultEntry {} impl PartialOrd for ResultEntry { fn partial_cmp(&self, other: &Self) -> Option { - match self.omim_id.partial_cmp(&other.omim_id) { - Some(core::cmp::Ordering::Equal) => {} - ord => return ord, - } - self.name.partial_cmp(&other.name) + Some(self.cmp(other)) } } diff --git a/src/server/actix_server/hpo_terms.rs b/src/server/actix_server/hpo_terms.rs index 77f5ee9..bd9eb96 100644 --- a/src/server/actix_server/hpo_terms.rs +++ b/src/server/actix_server/hpo_terms.rs @@ -75,11 +75,7 @@ impl Eq for ResultEntry {} impl PartialOrd for ResultEntry { fn partial_cmp(&self, other: &Self) -> Option { - match self.term_id.partial_cmp(&other.term_id) { - Some(core::cmp::Ordering::Equal) => {} - ord => return ord, - } - self.name.partial_cmp(&other.name) + Some(self.cmp(other)) } }