Conversation
|
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
|
cc @retep998 |
src/libstd/io/stdio.rs
Outdated
There was a problem hiding this comment.
Perhaps this could just be:
enum Maybe<T> {
Real(T),
Empty,
}
impl<W: Write> Write for Maybe<W> { ... }
impl<R: Read> Read for Maybe<W> { ... }|
Thanks @sfackler! A few notes:
|
|
Updated |
src/libstd/sys/windows/stdio.rs
Outdated
There was a problem hiding this comment.
I think this needs a surrounding Ok (above as well), perhaps jut a get(...).map(|handle| ...) ?
|
Just a few minor nits, but otherwise r=me, thanks @sfackler! |
|
@bors r=alexcrichton 517d3bd |
|
⌛ Testing commit 517d3bd with merge bdde81d... |
|
💔 Test failed - auto-win-gnu-64-opt |
src/test/run-pass/rfc-1014.rs
Outdated
There was a problem hiding this comment.
STD_OUTPUT_HANDLEisn't aHANDLEso you need toGetStdHandleto get the actualHANDLEtoCloseHandle.- Write a separate test which does
SetStdHandle(STD_OUTPUT_HANDLE, NULL)so it can testprintln!'s ability to replace stdout with a sink, rather than just stdout's ability to ignore errors.
155dd8f to
7e4ae36
Compare
Closes rust-lang#25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
|
⌛ Testing commit a7bbd7d with merge 57cd1c4... |
|
💔 Test failed - auto-linux-32-opt |
|
@bors: retry On Sun, Jun 14, 2015 at 10:11 PM, bors notifications@github.com wrote:
|
Closes #25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
|
I tagged this as stable-regression since it changes the behavior of stdio. |
Closes #25977
The various
stdfoo_rawmethods in std::io now returnio::Results,since they may not exist on Windows. They will always return
OkonUnix-like platforms.
[breaking-change]