We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code:
use std::io; fn main() { let mut stdin = io::stdin(); let mut buf = ~[0u8, ..10]; let r1 = stdin.read(buf); let r2 = stdin.read(buf); }
Execute as:
echo hi | ./tmp
Result is:
task '<main>' failed at 'Unhandled condition: io_error: io::IoError{kind: EndOfFile, desc: "End of file", detail: None}', /Users/yozh/devel/left/rust/src/libstd/condition.rs:131
Result should be None according to Reader::read documentation (returns None on EOF).
None
Reader::read
$ rustc --version rustc 0.9-pre (52769b6 2013-12-18 22:41:36 -0800) host: x86_64-apple-darwin
The text was updated successfully, but these errors were encountered:
Don't raise EndOfFile when stdin::read reaches EOF.
1b3784c
Just return `None' as stipulated by the `Reader' trait. Fixes rust-lang#11104.
Sorry I didn't get around to this earlier, but as with #11126 I'm closing this as working-as-intended.
Sorry, something went wrong.
Auto merge of rust-lang#11104 - Alexendoo:arc-with-non-send-sync, r=C…
26edd5a
…entri3 `arc_with_non_send_sync`: reword and move to `suspicious` Fixes rust-lang#11079 changelog: [`arc_with_non_send_sync`]: move to complexity
ced5a58
Successfully merging a pull request may close this issue.
Code:
Execute as:
Result is:
Result should be
None
according toReader::read
documentation (returnsNone
on EOF).The text was updated successfully, but these errors were encountered: