diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2023-05-01 13:27:02 +0200 |
|---|---|---|
| committer | Konrad Borowski <konrad@borowski.pw> | 2023-05-01 13:27:02 +0200 |
| commit | 3abc30719e588745c8a9190a9842263cd2bfc463 (patch) | |
| tree | 947f205678ca27b28019c38ba2371575cf4aa8ed /library/std/src | |
| parent | 174c0e86ca953a200d4a1afabe7a17e55f9783c2 (diff) | |
| download | rust-3abc30719e588745c8a9190a9842263cd2bfc463.tar.gz rust-3abc30719e588745c8a9190a9842263cd2bfc463.zip | |
Inline socket function implementations
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/unix/l4re.rs | 3 | ||||
| -rw-r--r-- | library/std/src/sys/wasi/net.rs | 3 | ||||
| -rw-r--r-- | library/std/src/sys_common/net.rs | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/l4re.rs b/library/std/src/sys/unix/l4re.rs index 640cd96456c..d77a7ee87da 100644 --- a/library/std/src/sys/unix/l4re.rs +++ b/library/std/src/sys/unix/l4re.rs @@ -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 } diff --git a/library/std/src/sys/wasi/net.rs b/library/std/src/sys/wasi/net.rs index fc78cfcc17c..a5e0f9ee8ba 100644 --- a/library/std/src/sys/wasi/net.rs +++ b/library/std/src/sys/wasi/net.rs @@ -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 } diff --git a/library/std/src/sys_common/net.rs b/library/std/src/sys_common/net.rs index a8deb885069..652c695fc57 100644 --- a/library/std/src/sys_common/net.rs +++ b/library/std/src/sys_common/net.rs @@ -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 } |
