about summary refs log tree commit diff
path: root/library/std/src/sys/net/connection/socket/unix.rs
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2025-03-04 20:28:38 -0800
committerThalia Archibald <thalia@archibald.dev>2025-03-06 20:20:38 -0800
commit988eb1997014987caad878699ee1e7c000214508 (patch)
tree18f3a0bc36f4f660467f921878f917b36f13c8d0 /library/std/src/sys/net/connection/socket/unix.rs
parent08db600e8e276b548e986abe7239c2a85d2f425f (diff)
downloadrust-988eb1997014987caad878699ee1e7c000214508.tar.gz
rust-988eb1997014987caad878699ee1e7c000214508.zip
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.
Diffstat (limited to 'library/std/src/sys/net/connection/socket/unix.rs')
-rw-r--r--library/std/src/sys/net/connection/socket/unix.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/net/connection/socket/unix.rs b/library/std/src/sys/net/connection/socket/unix.rs
index 29fb47ddca3..e633cf772c5 100644
--- a/library/std/src/sys/net/connection/socket/unix.rs
+++ b/library/std/src/sys/net/connection/socket/unix.rs
@@ -326,7 +326,7 @@ impl Socket {
         // so we don't need to zero it here.
         // reference: https://linux.die.net/man/2/recvfrom
         let mut storage: mem::MaybeUninit<libc::sockaddr_storage> = mem::MaybeUninit::uninit();
-        let mut addrlen = mem::size_of_val(&storage) as libc::socklen_t;
+        let mut addrlen = size_of_val(&storage) as libc::socklen_t;
 
         let n = cvt(unsafe {
             libc::recvfrom(