diff options
| author | joboet <jonasboettiger@icloud.com> | 2024-11-25 13:49:25 +0100 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2024-11-26 18:38:24 +0100 |
| commit | c14d137bfc5133f5a38fad2f58e30fed9c47ffe2 (patch) | |
| tree | 39c74cdea7465778402cd3bcba499b9317d6c606 /library/std/src/os/unix/net/addr.rs | |
| parent | d39afacbdfbc4fb1f8a6dcdb4af7c357bae8f7db (diff) | |
| download | rust-c14d137bfc5133f5a38fad2f58e30fed9c47ffe2.tar.gz rust-c14d137bfc5133f5a38fad2f58e30fed9c47ffe2.zip | |
std: update internal uses of `io::const_error!`
Diffstat (limited to 'library/std/src/os/unix/net/addr.rs')
| -rw-r--r-- | library/std/src/os/unix/net/addr.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/os/unix/net/addr.rs b/library/std/src/os/unix/net/addr.rs index 253e1503cf7..56789f235fd 100644 --- a/library/std/src/os/unix/net/addr.rs +++ b/library/std/src/os/unix/net/addr.rs @@ -30,14 +30,14 @@ pub(super) fn sockaddr_un(path: &Path) -> io::Result<(libc::sockaddr_un, libc::s let bytes = path.as_os_str().as_bytes(); if bytes.contains(&0) { - return Err(io::const_io_error!( + return Err(io::const_error!( io::ErrorKind::InvalidInput, "paths must not contain interior null bytes", )); } if bytes.len() >= addr.sun_path.len() { - return Err(io::const_io_error!( + return Err(io::const_error!( io::ErrorKind::InvalidInput, "path must be shorter than SUN_LEN", )); @@ -119,7 +119,7 @@ impl SocketAddr { // linux returns zero bytes of address len = SUN_PATH_OFFSET as libc::socklen_t; // i.e., zero-length address } else if addr.sun_family != libc::AF_UNIX as libc::sa_family_t { - return Err(io::const_io_error!( + return Err(io::const_error!( io::ErrorKind::InvalidInput, "file descriptor did not correspond to a Unix socket", )); @@ -273,7 +273,7 @@ impl linux_ext::addr::SocketAddrExt for SocketAddr { addr.sun_family = libc::AF_UNIX as libc::sa_family_t; if name.len() + 1 > addr.sun_path.len() { - return Err(io::const_io_error!( + return Err(io::const_error!( io::ErrorKind::InvalidInput, "abstract socket name must be shorter than SUN_LEN", )); |
