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

Fix `Stdio::piped` example code and lint #64294

Open
wants to merge 1 commit into
base: master
from

Conversation

@wchargin
Copy link

commented Sep 8, 2019

Summary:
Invoking rev does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use echo rather
than rev, which probably explains the source of the discrepancy.

Also, a mut qualifier is unused.

Test Plan:
Copy the code block into https://play.rust-lang.org with a fn main
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an unused_mut warning and then panic.

wchargin-branch: stdio-piped-docs

Fix `Stdio::piped` example code and lint
Summary:
Invoking `rev` does not add a trailing newline when none is present in
the input (at least on my Debian). Nearby examples use `echo` rather
than `rev`, which probably explains the source of the discrepancy.

Also, a `mut` qualifier is unused.

Test Plan:
Copy the code block into <https://play.rust-lang.org> with a `fn main`
wrapper, and run it. Note that it compiles and runs cleanly; prior to
this commit, it would emit an `unused_mut` warning and then panic.

wchargin-branch: stdio-piped-docs
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Sep 8, 2019

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @withoutboats (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. Due to 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 the contribution instructions for more information.

@JohnCSimon

This comment has been minimized.

Copy link

commented Sep 14, 2019

Ping from triage
@withoutboats Can you please review this PR? Thank you.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.