Skip to content

Commit 1edf723

Browse files
authored
Rollup merge of #116289 - linkmauve:patch-1, r=the8472
Add missing #[inline] on AsFd impl for sys::unix::fs::File This operation should be extremely cheap, at most the `mov` of the underlying file descriptor, but due to this missing `#[inline]` it is currently a function call.
2 parents af77806 + 133aa56 commit 1edf723

File tree

1 file changed

+1
-0
lines changed
  • library/std/src/sys/unix

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,7 @@ impl FromInner<FileDesc> for File {
13911391
}
13921392

13931393
impl AsFd for File {
1394+
#[inline]
13941395
fn as_fd(&self) -> BorrowedFd<'_> {
13951396
self.0.as_fd()
13961397
}

0 commit comments

Comments
 (0)