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

Merged
merged 1 commit into from Sep 23, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -935,12 +935,12 @@ impl Stdio {
/// .expect("Failed to spawn child process");
///
/// {
/// let mut stdin = child.stdin.as_mut().expect("Failed to open stdin");
/// let stdin = child.stdin.as_mut().expect("Failed to open stdin");
/// stdin.write_all("Hello, world!".as_bytes()).expect("Failed to write to stdin");
/// }
///
/// let output = child.wait_with_output().expect("Failed to read stdout");
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH");
/// ```
#[stable(feature = "process", since = "1.0.0")]
pub fn piped() -> Stdio { Stdio(imp::Stdio::MakePipe) }
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.