remove unneeded FromRawFd

Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
This commit is contained in:
Friedel Ziegelmayer 2020-04-25 19:01:24 +02:00 committed by GitHub
parent 258147d15c
commit 0d6ea14e5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 9 deletions

View File

@ -159,15 +159,6 @@ impl<T: IntoRawFd> IntoRawFd for Async<T> {
self.into_inner().unwrap().into_raw_fd()
}
}
#[cfg(unix)]
impl<T: FromRawFd + AsRawFd> FromRawFd for Async<T> {
unsafe fn from_raw_fd(fd: RawFd) -> Self {
let raw = T::from_raw_fd(fd);
Async::new(raw).expect("invalid file descriptor")
}
}
#[cfg(windows)]
impl<T: AsRawSocket> Async<T> {
/// Creates an async I/O handle.