Skip to content

Commit

Permalink
Inline socket function implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilaBorowska committed May 1, 2023
1 parent 174c0e8 commit 3abc307
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/sys/unix/l4re.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ pub mod net {
unimpl!();
}

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

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

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down
3 changes: 3 additions & 0 deletions library/std/src/sys/wasi/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ impl TcpStream {
}
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down Expand Up @@ -275,6 +276,7 @@ impl TcpListener {
}
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down Expand Up @@ -438,6 +440,7 @@ impl UdpSocket {
unsupported()
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down
3 changes: 3 additions & 0 deletions library/std/src/sys_common/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ impl TcpStream {
Ok(TcpStream { inner: sock })
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down Expand Up @@ -428,6 +429,7 @@ impl TcpListener {
Ok(TcpListener { inner: sock })
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down Expand Up @@ -518,6 +520,7 @@ impl UdpSocket {
Ok(UdpSocket { inner: sock })
}

#[inline]
pub fn socket(&self) -> &Socket {
&self.inner
}
Expand Down

0 comments on commit 3abc307

Please sign in to comment.