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:
@@ -9,8 +9,6 @@ crate::newtype_index! {
|
||||
|
||||
#[test]
|
||||
fn index_size_is_optimized() {
|
||||
use std::mem::size_of;
|
||||
|
||||
assert_eq!(size_of::<MyIdx>(), 4);
|
||||
// Uses 0xFFFF_FFFB
|
||||
assert_eq!(size_of::<Option<MyIdx>>(), 4);
|
||||
|
||||
Reference in New Issue
Block a user