Skip to content

Commit 9ec4024

Browse files
committed
clippy
1 parent f846e6d commit 9ec4024

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

library/std/src/os/windows/net/addr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ fn sun_path_offset(addr: &c::sockaddr_un) -> usize {
4646
let path = &addr.sun_path as *const _ as usize;
4747
path - base
4848
}
49+
#[allow(dead_code)]
4950
pub struct SocketAddr {
5051
addr: c::sockaddr_un,
5152
len: c_int,

library/std/src/os/windows/net/listener.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<'a> Iterator for Incoming<'a> {
6060
}
6161

6262
fn size_hint(&self) -> (usize, Option<usize>) {
63-
(usize::max_value(), None)
63+
(usize::MAX, None)
6464
}
6565
}
6666

library/std/src/os/windows/net/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl<'a> io::Write for &'a UnixStream {
8888
}
8989

9090
impl AsSocket for UnixStream {
91-
fn as_socket(&self) -> BorrowedSocket {
91+
fn as_socket(&self) -> BorrowedSocket<'_> {
9292
self.0.as_socket()
9393
}
9494
}

library/std/src/sys/net/connection/socket/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl Socket {
132132
n => Ok(Socket::from_raw(n)),
133133
}
134134
}?;
135-
socket.0.set_no_inherit();
135+
socket.0.set_no_inherit()?;
136136
Ok(socket)
137137
}
138138
pub fn new(addr: &SocketAddr, ty: c_int) -> io::Result<Socket> {

0 commit comments

Comments
 (0)