From 52a104cbbb048db083f01ca419d8a0ce17ea7c5e Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sun, 28 Apr 2024 18:26:59 +0200 Subject: [PATCH] Make PartialOrd impl canonical for `Empirical` --- src/distribution/empirical.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/distribution/empirical.rs b/src/distribution/empirical.rs index 21e70522..24c327c9 100644 --- a/src/distribution/empirical.rs +++ b/src/distribution/empirical.rs @@ -13,13 +13,13 @@ impl Eq for NonNAN {} impl PartialOrd for NonNAN { fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) + Some(self.cmp(other)) } } impl Ord for NonNAN { fn cmp(&self, other: &Self) -> Ordering { - self.partial_cmp(other).unwrap() + self.0.partial_cmp(&other.0).unwrap() } }