mirror of
https://gitlab.com/artofrev/smallint.git
synced 2024-11-13 17:01:16 -05:00
fix SmallUint::partial_cmp
This commit is contained in:
parent
2e081c03c5
commit
81739a1311
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue
Block a user