compiler: Use size_of from the prelude instead of imported
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
This commit is contained in:
parent
ac951d3799
commit
38fad984c6
30 changed files with 64 additions and 74 deletions
|
@ -123,7 +123,7 @@ pub(crate) fn read_file(
|
|||
|
||||
// Check HEADER_FORMAT_VERSION
|
||||
{
|
||||
debug_assert!(::std::mem::size_of_val(&HEADER_FORMAT_VERSION) == 2);
|
||||
debug_assert!(size_of_val(&HEADER_FORMAT_VERSION) == 2);
|
||||
let mut header_format_version = [0u8; 2];
|
||||
file.read_exact(&mut header_format_version)?;
|
||||
let header_format_version =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue