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:
linkmauve 2023-09-30 17:56:42 +02:00 committed by GitHub
parent 75d731eee9
commit 133aa56a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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