From 0bf0125e8271e7c8449da50d0572de5147043ca7 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 28 Mar 2021 10:49:29 +0100 Subject: [PATCH] Reverse negation on ordering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Daniel GarcĂ­a --- src/db/models/organization.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs index 50d46064..1eeb04d2 100644 --- a/src/db/models/organization.rs +++ b/src/db/models/organization.rs @@ -90,11 +90,11 @@ impl PartialOrd for UserOrgType { } fn gt(&self, other: &i32) -> bool { - !matches!(self.partial_cmp(other), Some(Ordering::Less) | Some(Ordering::Equal)) + matches!(self.partial_cmp(other), Some(Ordering::Greater)) } fn ge(&self, other: &i32) -> bool { - !matches!(self.partial_cmp(other), Some(Ordering::Less)) + matches!(self.partial_cmp(other), Some(Ordering::Greater) | Some(Ordering::Equal)) } }