From 81739a131108fefccbc8e8afaf60a8621fde3e07 Mon Sep 17 00:00:00 2001 From: Solomon Ucko Date: Sun, 14 Aug 2022 16:49:42 -0400 Subject: [PATCH] fix SmallUint::partial_cmp --- src/ord.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ord.rs b/src/ord.rs index ded9d7a..21397ef 100644 --- a/src/ord.rs +++ b/src/ord.rs @@ -40,8 +40,8 @@ impl PartialOrd for SmallUint { Ordering::Greater => Some(Ordering::Less), Ordering::Less => Some(Ordering::Greater), Ordering::Equal => { - let slice1 = unsafe { core::slice::from_raw_parts(r, *s) }; - let slice2 = unsafe { core::slice::from_raw_parts(i, *j) }; + let slice1 = unsafe { core::slice::from_raw_parts(*r, *s) }; + let slice2 = unsafe { core::slice::from_raw_parts(*i, *j) }; for i in 0..*s { match slice1[s - 1 - i].cmp(&slice2[s - 1 - i]) { Ordering::Less => return Some(Ordering::Less),