-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Conversation
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
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. |
Ping from triage Thanks. |
Pinging from triage |
@bors: r+ |
📌 Commit 9bf5773 has been approved by |
r? @Dylan-DPC |
… r=Dylan-DPC 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
… r=Dylan-DPC 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
Rollup of 7 pull requests Successful merges: - #64294 (Fix `Stdio::piped` example code and lint) - #64670 (Cleanup syntax::ext::build) - #64674 (Propagate `types.err` in locals further to avoid spurious knock-down errors) - #64676 (Parse assoc type bounds in generic params and provide custom diagnostic) - #64677 (remove outdated comment) - #64679 (Infer consts more consistently) - #64688 (Clarify the "since" tidy check) Failed merges: r? @ghost
Thanks for the review! :-) |
Summary:
Invoking
rev
does not add a trailing newline when none is present inthe input (at least on my Debian). Nearby examples use
echo
ratherthan
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