about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2023-10-02 16:09:42 -0400
committerGitHub <noreply@github.com>2023-10-02 16:09:42 -0400
commit1edf7233faefe64265898db10f5df4b57e9beb5d (patch)
treebda724031e7d1f915859282b892de7cdfa496c6e /library/std/src/sys
parentaf77806bee45ca8a73b24746b84b011840cddc39 (diff)
parent133aa56a84a4d52a066c4fbf12b53314310e91e1 (diff)
downloadrust-1edf7233faefe64265898db10f5df4b57e9beb5d.tar.gz
rust-1edf7233faefe64265898db10f5df4b57e9beb5d.zip
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.
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/unix/fs.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index 764e1f25790..5ed2bdd7fe3 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -1391,6 +1391,7 @@ impl FromInner<FileDesc> for File {
 }
 
 impl AsFd for File {
+    #[inline]
     fn as_fd(&self) -> BorrowedFd<'_> {
         self.0.as_fd()
     }