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.
This commit is contained in:
Tyler Mandry 2023-10-02 16:09:42 -04:00 committed by GitHub
commit 1edf7233fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1391,6 +1391,7 @@ fn from_inner(file_desc: FileDesc) -> Self {
}
impl AsFd for File {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
self.0.as_fd()
}