diff --git a/compio-net/src/tcp.rs b/compio-net/src/tcp.rs index f72f9fc9..e2f9f237 100644 --- a/compio-net/src/tcp.rs +++ b/compio-net/src/tcp.rs @@ -169,7 +169,9 @@ impl TcpStream { /// Creates new TcpStream from a std::net::TcpStream. pub fn from_std(stream: std::net::TcpStream) -> io::Result { - Ok(Self { inner: Socket::from_socket2(Socket2::from(stream))? }) + Ok(Self { + inner: Socket::from_socket2(Socket2::from(stream))?, + }) } /// Close the socket. If the returned future is dropped before polling, the diff --git a/compio-net/src/unix.rs b/compio-net/src/unix.rs index 361253fd..f99e7dcc 100644 --- a/compio-net/src/unix.rs +++ b/compio-net/src/unix.rs @@ -149,8 +149,10 @@ impl UnixStream { #[cfg(unix)] /// Creates new UnixStream from a std::os::unix::net::UnixStream. - pub fn from_std(stream: std::os::unix::net::UnixStream) -> io::Result { - Ok(Self { inner: Socket::from_socket2(Socket2::from(stream))? }) + pub fn from_std(stream: std::os::unix::net::UnixStream) -> io::Result { + Ok(Self { + inner: Socket::from_socket2(Socket2::from(stream))?, + }) } /// Close the socket. If the returned future is dropped before polling, the