diff options
| author | linkmauve <linkmauve@linkmauve.fr> | 2023-09-30 17:56:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-30 17:56:42 +0200 |
| commit | 133aa56a84a4d52a066c4fbf12b53314310e91e1 (patch) | |
| tree | 694504d46c856c614f26901ab8dd27f18d4df7aa | |
| parent | 75d731eee97b300b3cbd13222fe17c34b15f006a (diff) | |
| download | rust-133aa56a84a4d52a066c4fbf12b53314310e91e1.tar.gz rust-133aa56a84a4d52a066c4fbf12b53314310e91e1.zip | |
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.
| -rw-r--r-- | library/std/src/sys/unix/fs.rs | 1 |
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() } |
