Skip to content

Commit

Permalink
Unrolled build for rust-lang#116289
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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.
  • Loading branch information
rust-timer committed Oct 2, 2023
2 parents 8e47113 + 133aa56 commit 507f5b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,7 @@ impl FromInner<FileDesc> for File {
}

impl AsFd for File {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
self.0.as_fd()
}
Expand Down

0 comments on commit 507f5b0

Please sign in to comment.