Skip to content

Commit

Permalink
changes to pass the format check
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Jun 15, 2020
1 parent d221ffc commit 9d596b5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/libstd/sys/hermit/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,10 @@ impl TcpStream {
IpAddr::V4(Ipv4Addr::new(addr.0[0], addr.0[1], addr.0[2], addr.0[3])),
port,
),
Ipv6(ref addr) => SocketAddr::new(
IpAddr::V6(Ipv6Addr::new(addr.0)),
port,
),
Ipv6(ref addr) => SocketAddr::new(IpAddr::V6(Ipv6Addr::new(addr.0)), port),
_ => {
return Err(io::Error::new(ErrorKind::Other, "peer_addr failed"));
},
}
};

Ok(saddr)
Expand Down Expand Up @@ -232,13 +229,10 @@ impl TcpListener {
IpAddr::V4(Ipv4Addr::new(addr.0[0], addr.0[1], addr.0[2], addr.0[3])),
port,
),
Ipv6(ref addr) => SocketAddr::new(
IpAddr::V6(Ipv6Addr::new(addr.0)),
port,
),
Ipv6(ref addr) => SocketAddr::new(IpAddr::V6(Ipv6Addr::new(addr.0)), port),
_ => {
return Err(io::Error::new(ErrorKind::Other, "accept failed"));
},
}
};

Ok((TcpStream(Arc::new(Socket(handle))), saddr))
Expand Down

0 comments on commit 9d596b5

Please sign in to comment.