commit 0bf0125e8271e7c8449da50d0572de5147043ca7
parent da55d5ec700dc430a8b75917ac9d4834b1f0ace8
Author: Jake Howard <RealOrangeOne@users.noreply.github.com>
Date: Sun, 28 Mar 2021 10:49:29 +0100
Reverse negation on ordering
Co-authored-by: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/db/models/organization.rs b/src/db/models/organization.rs
@@ -90,11 +90,11 @@ impl PartialOrd<i32> 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))
}
}