-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
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
Remove std::old_io from Standard Input in tutorial book #23800
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
a full line of input. Nice and easy. | ||
The `read_line()` method can be called on the result of `stdin()` to write | ||
a full line of input to its argument, a String buffer. We pass `input` as a | ||
mutable reference, since `read_line()` will be modifying the buffer. Every |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
References aren't mentioned until chapter 3.3 of the book. So it might be nice to say something like you did on L118, so newbies (like myself) don't get confused.
Yes, good idea. I've added a few sentences quickly covering the idea, and a link to the appropriate sections if they are curious. |
@@ -28,8 +35,7 @@ Since writing the fully qualified name all the time is annoying, we can use | |||
the `use` statement to import it in: | |||
|
|||
```{rust} | |||
# #![feature(old_io)] | |||
use std::old_io::stdin; | |||
use std::io::stdin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{rust, ignore} Markdown is used everywhere but here and just below
Since std::old_io is deprecated, this removes all instances from the Standard Input page in the tutorial book and replaces with the equivalent functions in std::io