impl AsFd for io::{Stdin, Stdout, Stderr}, not the sys versions

https://github.com/rust-lang/rust/pull/100892 implemented AsFd for the
sys versions, rather than for the public types. Change the
implementations to apply to the public types.
This commit is contained in:
Josh Triplett 2022-10-09 15:31:27 +01:00
parent c0784109da
commit 88bb4e4bda

View File

@ -23,7 +23,7 @@ impl AsRawFd for Stdin {
}
}
impl AsFd for Stdin {
impl AsFd for io::Stdin {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
unsafe { BorrowedFd::borrow_raw(0) }
@ -67,7 +67,7 @@ impl AsRawFd for Stdout {
}
}
impl AsFd for Stdout {
impl AsFd for io::Stdout {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
unsafe { BorrowedFd::borrow_raw(1) }
@ -114,7 +114,7 @@ impl AsRawFd for Stderr {
}
}
impl AsFd for Stderr {
impl AsFd for io::Stderr {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
unsafe { BorrowedFd::borrow_raw(2) }