Skip to content

Commit 14cfc3a

Browse files
authored
Merge pull request #4219 from thaliaarchi/use-prelude-size-of
Use `size_of` from the prelude instead of imported
2 parents 1d7cd1e + 2ff1050 commit 14cfc3a

File tree

1 file changed

+1
-1
lines changed
  • src/tools/miri/bench-cargo-miri/mse/src

1 file changed

+1
-1
lines changed

src/tools/miri/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)