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.

>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
pa...@pablobm.com
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to