Fix AsRawHandle

This commit is contained in:
Ian Douglas Scott 2017-08-03 15:54:53 -07:00
parent eac01f123d
commit 64e426e8e9
No known key found for this signature in database
GPG Key ID: 4924E10E199B5959

View File

@ -75,21 +75,21 @@ impl AsRawHandle for fs::File {
#[stable(feature = "asraw_stdio", since = "1.21.0")]
impl AsRawHandle for io::Stdin {
fn as_raw_handle(&self) -> RawHandle {
unsafe { c::GetStdHandle(c::STD_INPUT_HANDLE) } as RawHandle
unsafe { c::GetStdHandle(c::STD_INPUT_HANDLE) as RawHandle }
}
}
#[stable(feature = "asraw_stdio", since = "1.21.0")]
impl AsRawHandle for io::Stdout {
fn as_raw_handle(&self) -> RawHandle {
unsafe { c::GetStdHandle(c::STD_OUTPUT_HANDLE) } as RawHandle
unsafe { c::GetStdHandle(c::STD_OUTPUT_HANDLE) as RawHandle }
}
}
#[stable(feature = "asraw_stdio", since = "1.21.0")]
impl AsRawHandle for io::Stderr {
fn as_raw_handle(&self) -> RawHandle {
unsafe { c::GetStdHandle(c::STD_ERROR_HANDLE) } as RawHandle
unsafe { c::GetStdHandle(c::STD_ERROR_HANDLE) as RawHandle }
}
}