mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
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:
parent
c0784109da
commit
88bb4e4bda
@ -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) }
|
||||
|
Loading…
Reference in New Issue
Block a user