Skip to content

Commit 1cdb46d

Browse files
authored
Merge pull request rust-lang#4219 from thaliaarchi/use-prelude-size-of
Use `size_of` from the prelude instead of imported
2 parents 1120657 + 0254d54 commit 1cdb46d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bench-cargo-miri/mse/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn main() {
1010
}
1111

1212
fn read_i16(buffer: &[u8], index: usize) -> i16 {
13-
const SIZE: usize = std::mem::size_of::<i16>();
13+
const SIZE: usize = size_of::<i16>();
1414
let mut bytes: [u8; SIZE] = [0u8; SIZE];
1515
bytes.copy_from_slice(&buffer[(index * SIZE)..(index * SIZE + SIZE)]);
1616
unsafe { std::mem::transmute(bytes) }

0 commit comments

Comments
 (0)