Skip to content

Commit 4d4e500

Browse files
committed
fix: resolve local cargo clippy complaints of casting literal numbers
1 parent 6ab2e64 commit 4d4e500

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vm/src/value.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ impl From<F56> for f64 {
253253
let f64_biased_exponent: u64 = match { f56_biased_exponent } {
254254
0b11_1111_1111 => {
255255
// Special case of all [1]s meaning NaN or Infinity
256-
0b111_1111_1111 as u64
256+
0b111_1111_1111_u64
257257
}
258258
0b00_0000_0000 => {
259259
// Special case of all [0]s meaning 0 or subnormal
260260
if f56_mantissa == 0u64 {
261261
// the f56 was 0 so the f64 should be 0
262-
0b000_0000_0000 as u64
262+
0b000_0000_0000_u64
263263
} else {
264264
// the f56 was subnormal so the f64 should interpret the exponent as -512
265265
// note the slightly different addition of 1022 instead of 1023
@@ -276,7 +276,7 @@ impl From<F56> for f64 {
276276
};
277277

278278
let f64_sign = f56_sign as u64;
279-
let f64_mantissa = f56_mantissa << 7 as u64; // we add 7 bits in mantissa, but they're all zeros
279+
let f64_mantissa = f56_mantissa << 7_u64; // we add 7 bits in mantissa, but they're all zeros
280280
let word: u64 = f64_sign << 63 | f64_biased_exponent << 52 | f64_mantissa;
281281
f64::from_be_bytes(word.to_be_bytes())
282282
}

0 commit comments

Comments
 (0)