Skip to content

Commit 3abc307

Browse files
committed
Inline socket function implementations
1 parent 174c0e8 commit 3abc307

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

library/std/src/sys/unix/l4re.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ pub mod net {
184184
unimpl!();
185185
}
186186

187+
#[inline]
187188
pub fn socket(&self) -> &Socket {
188189
&self.inner
189190
}
@@ -306,6 +307,7 @@ pub mod net {
306307
unimpl!();
307308
}
308309

310+
#[inline]
309311
pub fn socket(&self) -> &Socket {
310312
&self.inner
311313
}
@@ -372,6 +374,7 @@ pub mod net {
372374
unimpl!();
373375
}
374376

377+
#[inline]
375378
pub fn socket(&self) -> &Socket {
376379
&self.inner
377380
}

library/std/src/sys/wasi/net.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ impl TcpStream {
185185
}
186186
}
187187

188+
#[inline]
188189
pub fn socket(&self) -> &Socket {
189190
&self.inner
190191
}
@@ -275,6 +276,7 @@ impl TcpListener {
275276
}
276277
}
277278

279+
#[inline]
278280
pub fn socket(&self) -> &Socket {
279281
&self.inner
280282
}
@@ -438,6 +440,7 @@ impl UdpSocket {
438440
unsupported()
439441
}
440442

443+
#[inline]
441444
pub fn socket(&self) -> &Socket {
442445
&self.inner
443446
}

library/std/src/sys_common/net.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ impl TcpStream {
239239
Ok(TcpStream { inner: sock })
240240
}
241241

242+
#[inline]
242243
pub fn socket(&self) -> &Socket {
243244
&self.inner
244245
}
@@ -428,6 +429,7 @@ impl TcpListener {
428429
Ok(TcpListener { inner: sock })
429430
}
430431

432+
#[inline]
431433
pub fn socket(&self) -> &Socket {
432434
&self.inner
433435
}
@@ -518,6 +520,7 @@ impl UdpSocket {
518520
Ok(UdpSocket { inner: sock })
519521
}
520522

523+
#[inline]
521524
pub fn socket(&self) -> &Socket {
522525
&self.inner
523526
}

0 commit comments

Comments
 (0)