kmc-solid: Replace {From,Into}Inner<c_int> impls with *RawFd for Socket
Follows how other targets are implemented.
This commit is contained in:
@@ -378,7 +378,7 @@ macro_rules! impl_as_raw_fd {
|
||||
impl AsRawFd for net::$t {
|
||||
#[inline]
|
||||
fn as_raw_fd(&self) -> RawFd {
|
||||
*self.as_inner().socket().as_inner()
|
||||
self.as_inner().socket().as_raw_fd()
|
||||
}
|
||||
}
|
||||
)*};
|
||||
@@ -391,7 +391,7 @@ macro_rules! impl_from_raw_fd {
|
||||
impl FromRawFd for net::$t {
|
||||
#[inline]
|
||||
unsafe fn from_raw_fd(fd: RawFd) -> net::$t {
|
||||
let socket = sys::net::Socket::from_inner(fd);
|
||||
let socket = unsafe { sys::net::Socket::from_raw_fd(fd) };
|
||||
net::$t::from_inner(sys_common::net::$t::from_inner(socket))
|
||||
}
|
||||
}
|
||||
@@ -405,7 +405,7 @@ macro_rules! impl_into_raw_fd {
|
||||
impl IntoRawFd for net::$t {
|
||||
#[inline]
|
||||
fn into_raw_fd(self) -> RawFd {
|
||||
self.into_inner().into_socket().into_inner()
|
||||
self.into_inner().into_socket().into_raw_fd()
|
||||
}
|
||||
}
|
||||
)*};
|
||||
|
||||
Reference in New Issue
Block a user