Skip to content

Commit

Permalink
Remove redundant conversions.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Aug 22, 2021
1 parent be483ff commit a0ce5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/os/unix/net/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,15 @@ impl AsFd for UnixListener {
impl From<OwnedFd> for UnixListener {
#[inline]
fn from(fd: OwnedFd) -> UnixListener {
UnixListener(Socket::from_inner(FromInner::from_inner(OwnedFd::from(fd))))
UnixListener(Socket::from_inner(FromInner::from_inner(fd)))
}
}

#[unstable(feature = "io_safety", issue = "87074")]
impl From<UnixListener> for OwnedFd {
#[inline]
fn from(listener: UnixListener) -> OwnedFd {
listener.0.into_inner().into_inner().into()
listener.0.into_inner().into_inner()
}
}

Expand Down

0 comments on commit a0ce5f2

Please sign in to comment.