Share *RawFd trait implementations on Unix
They were previously only present on Apple platforms.
This commit is contained in:
parent
c1507ba37f
commit
cf95ac819c
2 changed files with 24 additions and 15 deletions
|
|
@ -1,11 +1,11 @@
|
|||
use fehler::throws;
|
||||
use libc::c_char;
|
||||
use std::net::Ipv4Addr;
|
||||
use std::os::unix::io::{AsRawFd, IntoRawFd, RawFd};
|
||||
use std::io::Error;
|
||||
use std::net::Ipv4Addr;
|
||||
use std::os::fd::AsRawFd;
|
||||
|
||||
mod sys;
|
||||
mod kern_control;
|
||||
mod sys;
|
||||
|
||||
pub use super::queue::TunQueue;
|
||||
|
||||
|
|
@ -62,15 +62,3 @@ impl TunInterface {
|
|||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl AsRawFd for TunInterface {
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
self.socket.as_raw_fd()
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoRawFd for TunInterface {
|
||||
fn into_raw_fd(self) -> RawFd {
|
||||
self.socket.into_raw_fd()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue