Skip to content

Commit

Permalink
📝 fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Oct 16, 2023
1 parent 295bf77 commit 3c85af2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/io/sys/unix/net/tcp_stream_connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ impl TcpStreamConnect {
// let err = io::Error::new(io::ErrorKind::Other, "no socket addresses resolved");
addr.to_socket_addrs()?
.next()
.ok_or_else(io::Error::new(
io::ErrorKind::Other,
"no socket addresses resolved",
))
.ok_or_else(|| io::Error::new(io::ErrorKind::Other, "no socket addresses resolved"))
.and_then(|addr| {
let stream = match addr {
SocketAddr::V4(..) => Socket::new(Domain::IPV4, Type::STREAM, None)?,
Expand Down

0 comments on commit 3c85af2

Please sign in to comment.