Skip to content

Commit

Permalink
impl AsFd for io::{Stdin, Stdout, Stderr}, not the sys versions
Browse files Browse the repository at this point in the history
rust-lang/rust#100892 implemented AsFd for the
sys versions, rather than for the public types. Change the
implementations to apply to the public types.
  • Loading branch information
joshtriplett committed Oct 9, 2022
1 parent 7d1680f commit 36f5c4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions std/src/sys/wasi/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down Expand Up @@ -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) }
Expand Down Expand Up @@ -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) }
Expand Down

0 comments on commit 36f5c4c

Please sign in to comment.