diff --git a/implementations/rust/src/value/value.rs b/implementations/rust/src/value/value.rs index 9a3d33f..4b6e94b 100644 --- a/implementations/rust/src/value/value.rs +++ b/implementations/rust/src/value/value.rs @@ -49,8 +49,8 @@ impl PartialEq for Float { impl Ord for Float { fn cmp(&self, other: &Self) -> Ordering { - let mut a = self.0.to_bits(); - let mut b = other.0.to_bits(); + let mut a: u32 = self.0.to_bits(); + let mut b: u32 = other.0.to_bits(); if a & 0x80000000 != 0 { a ^= 0x7fffffff; } if b & 0x80000000 != 0 { b ^= 0x7fffffff; } (a as i32).cmp(&(b as i32)) @@ -91,8 +91,8 @@ impl PartialEq for Double { impl Ord for Double { fn cmp(&self, other: &Self) -> Ordering { - let mut a = self.0.to_bits(); - let mut b = other.0.to_bits(); + let mut a: u64 = self.0.to_bits(); + let mut b: u64 = other.0.to_bits(); if a & 0x8000000000000000 != 0 { a ^= 0x7fffffffffffffff; } if b & 0x8000000000000000 != 0 { b ^= 0x7fffffffffffffff; } (a as i64).cmp(&(b as i64))