Skip to content

Commit 9d596b5

Browse files
committed
changes to pass the format check
1 parent d221ffc commit 9d596b5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/libstd/sys/hermit/net.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,10 @@ impl TcpStream {
149149
IpAddr::V4(Ipv4Addr::new(addr.0[0], addr.0[1], addr.0[2], addr.0[3])),
150150
port,
151151
),
152-
Ipv6(ref addr) => SocketAddr::new(
153-
IpAddr::V6(Ipv6Addr::new(addr.0)),
154-
port,
155-
),
152+
Ipv6(ref addr) => SocketAddr::new(IpAddr::V6(Ipv6Addr::new(addr.0)), port),
156153
_ => {
157154
return Err(io::Error::new(ErrorKind::Other, "peer_addr failed"));
158-
},
155+
}
159156
};
160157

161158
Ok(saddr)
@@ -232,13 +229,10 @@ impl TcpListener {
232229
IpAddr::V4(Ipv4Addr::new(addr.0[0], addr.0[1], addr.0[2], addr.0[3])),
233230
port,
234231
),
235-
Ipv6(ref addr) => SocketAddr::new(
236-
IpAddr::V6(Ipv6Addr::new(addr.0)),
237-
port,
238-
),
232+
Ipv6(ref addr) => SocketAddr::new(IpAddr::V6(Ipv6Addr::new(addr.0)), port),
239233
_ => {
240234
return Err(io::Error::new(ErrorKind::Other, "accept failed"));
241-
},
235+
}
242236
};
243237

244238
Ok((TcpStream(Arc::new(Socket(handle))), saddr))

0 commit comments

Comments
 (0)