Rollup merge of #77724 - sunfishcode:stdinlock-asrawfd, r=alexcrichton
Implement `AsRawFd` for `StdinLock` etc. on WASI. WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well. r? @alexcrichton
This commit is contained in:
commit
ad6e179060
1 changed files with 18 additions and 0 deletions
|
@ -160,3 +160,21 @@ impl AsRawFd for io::Stderr {
|
||||||
sys::stdio::Stderr.as_raw_fd()
|
sys::stdio::Stderr.as_raw_fd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> AsRawFd for io::StdinLock<'a> {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
sys::stdio::Stdin.as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> AsRawFd for io::StdoutLock<'a> {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
sys::stdio::Stdout.as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> AsRawFd for io::StderrLock<'a> {
|
||||||
|
fn as_raw_fd(&self) -> RawFd {
|
||||||
|
sys::stdio::Stderr.as_raw_fd()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue