Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Aug 26, 2024
1 parent 1214383 commit b621d24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion compio-net/src/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ impl TcpStream {

/// Creates new TcpStream from a std::net::TcpStream.
pub fn from_std(stream: std::net::TcpStream) -> io::Result<Self> {
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
Expand Down
6 changes: 4 additions & 2 deletions compio-net/src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self> {
Ok(Self { inner: Socket::from_socket2(Socket2::from(stream))? })
pub fn from_std(stream: std::os::unix::net::UnixStream) -> io::Result<Self> {
Ok(Self {
inner: Socket::from_socket2(Socket2::from(stream))?,
})
}

/// Close the socket. If the returned future is dropped before polling, the
Expand Down

0 comments on commit b621d24

Please sign in to comment.