Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Remove std::old_io from Standard Input in tutorial book #23800

wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 28, 2015

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

@rust-highfive
Copy link
Contributor

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
Copy link

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.

@ghost
Copy link
Author

ghost commented Mar 28, 2015

Yes, good idea. I've added a few sentences quickly covering the idea, and a link to the appropriate sections if they are curious.

@steveklabnik
Copy link
Member

Hey @bcoopers ! This diff looks good, but in #23787, I plan to remove it entirely, partly for this reason. So I'm going to close this in favor of that. Thank you for the pull request though!

@@ -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;

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants