rust/fpnum/src/lib.rs
changeset 15234 517f3a1dd5c2
parent 15233 293250953317
child 15235 58a0f2a6527b
--- a/rust/fpnum/src/lib.rs	Thu Jul 04 19:21:56 2019 +0300
+++ b/rust/fpnum/src/lib.rs	Thu Jul 04 21:40:50 2019 +0300
@@ -26,7 +26,7 @@
 
     #[inline]
     pub fn signum(&self) -> i8 {
-        (1u8 ^ self.sign_mask as u8).wrapping_sub(self.sign_mask as u8) as i8
+        (1u64 ^ self.sign_mask).wrapping_sub(self.sign_mask) as i8
     }
 
     #[inline]