Discussion:
[rust-dev] Bug in the guide?
Pablo Brasero Moreno
2014-09-17 19:53:24 UTC
Permalink
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
pablo at pablobm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140917/55a9ba84/attachment.html>
Steve Klabnik
2014-09-17 19:55:29 UTC
Permalink
Yup, that leading std:: in main shouldn't be there.
Tim Joseph Dumol
2014-09-17 19:58:20 UTC
Permalink
Hi Pablo,

You can submit a pull request at the Rust Github repo (
https://github.com/rust-lang/rust). The relevant file is at `/src/doc/
guide.md`: https://github.com/rust-lang/rust/blob/master/src/doc/guide.md.

Cheers,

Tim Dumol

On Thu, Sep 18, 2014 at 3:55 AM, Steve Klabnik <steve at steveklabnik.com>
Post by Steve Klabnik
Yup, that leading std:: in main shouldn't be there.
_______________________________________________
Rust-dev mailing list
Rust-dev at mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140918/2b6b6a9c/attachment.html>
Pablo Brasero Moreno
2014-09-17 20:34:25 UTC
Permalink
Rust community living up to its fame of awesomeness!

Thanks for that. The pull request is already on the queue.
Post by Tim Joseph Dumol
Hi Pablo,
You can submit a pull request at the Rust Github repo (
https://github.com/rust-lang/rust). The relevant file is at `/src/doc/
guide.md`: https://github.com/rust-lang/rust/blob/master/src/doc/guide.md.
Cheers,
Tim Dumol
On Thu, Sep 18, 2014 at 3:55 AM, Steve Klabnik <steve at steveklabnik.com>
Post by Steve Klabnik
Yup, that leading std:: in main shouldn't be there.
_______________________________________________
Rust-dev mailing list
Rust-dev at mozilla.org
https://mail.mozilla.org/listinfo/rust-dev
--
Pablo Brasero Moreno
pablo at pablobm.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140917/0e47f329/attachment.html>
Loading...