Skip to content

Commit 525c02f

Browse files
committed
fix: correct lint issue
1 parent 41ca2b3 commit 525c02f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data-in-depth/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn print_16bit_integers() {
1313
println!("a: {:016b} {}", a, a);
1414
println!("b: {:016b} {}", b, b);
1515

16-
let c: u16 = unsafe { std::mem::transmute(-1378i16) };
16+
let c: u16 = i16::cast_unsigned(-1378i16);
1717

1818
println!("c: {:016b} {}", c, c);
1919
}

0 commit comments

Comments
 (0)