Inline socket function implementations

This commit is contained in:
Konrad Borowski 2023-05-01 13:27:02 +02:00
parent 174c0e86ca
commit 3abc30719e
3 changed files with 9 additions and 0 deletions

View File

@ -184,6 +184,7 @@ pub mod net {
unimpl!();
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -306,6 +307,7 @@ pub mod net {
unimpl!();
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -372,6 +374,7 @@ pub mod net {
unimpl!();
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}

View File

@ -185,6 +185,7 @@ impl TcpStream {
}
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -275,6 +276,7 @@ impl TcpListener {
}
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -438,6 +440,7 @@ impl UdpSocket {
unsupported()
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}

View File

@ -239,6 +239,7 @@ impl TcpStream {
Ok(TcpStream { inner: sock })
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -428,6 +429,7 @@ impl TcpListener {
Ok(TcpListener { inner: sock })
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
@ -518,6 +520,7 @@ impl UdpSocket {
Ok(UdpSocket { inner: sock })
}
#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}