From 988eb1997014987caad878699ee1e7c000214508 Mon Sep 17 00:00:00 2001 From: Thalia Archibald Date: Tue, 4 Mar 2025 20:28:38 -0800 Subject: library: 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. --- library/std/src/sys/alloc/windows/tests.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'library/std/src/sys/alloc/windows') diff --git a/library/std/src/sys/alloc/windows/tests.rs b/library/std/src/sys/alloc/windows/tests.rs index 674a3e1d92d..1d5614528b1 100644 --- a/library/std/src/sys/alloc/windows/tests.rs +++ b/library/std/src/sys/alloc/windows/tests.rs @@ -1,9 +1,8 @@ use super::{Header, MIN_ALIGN}; -use crate::mem; #[test] fn alloc_header() { // Header must fit in the padding before an aligned pointer - assert!(mem::size_of::
() <= MIN_ALIGN); - assert!(mem::align_of::
() <= MIN_ALIGN); + assert!(size_of::
() <= MIN_ALIGN); + assert!(align_of::
() <= MIN_ALIGN); } -- cgit 1.4.1-3-g733a5