Pablo Brasero Moreno
2014-09-17 19:53:24 UTC
Hello all. I just subscribed to this list only because I found something
odd on the Rust Guide, and couldn't find a better place to send feedback.
It's about section 13 "Standard Input". The first example code is the
following:
use std::io;
fn main() {
println!("Type something!");
let input = std::io::stdin().read_line().ok().expect("Failed to read
line");
println!("{}", input);
}
This code throws a warning because `std::io` is imported, and then
`std::io::stdin` is used explicitly.
the `use` line. That way, the text seems to make better sense to me. Any t
houghts?
Also: please provide some obvious means of feedback! :-)
Thank you in advance,
odd on the Rust Guide, and couldn't find a better place to send feedback.
It's about section 13 "Standard Input". The first example code is the
following:
use std::io;
fn main() {
println!("Type something!");
let input = std::io::stdin().read_line().ok().expect("Failed to read
line");
println!("{}", input);
}
This code throws a warning because `std::io` is imported, and then
`std::io::stdin` is used explicitly.
From reading the paragraphs that follow that code, I assume that the
original intent of the author was to show that code without the first line,the `use` line. That way, the text seems to make better sense to me. Any t
houghts?
Also: please provide some obvious means of feedback! :-)
Thank you in advance,
--
Pablo Brasero Moreno
pablo at pablobm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140917/55a9ba84/attachment.html>
Pablo Brasero Moreno
pablo at pablobm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140917/55a9ba84/attachment.html>