Skip to content

Commit

Permalink
fix(stdin): Docs didn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Mar 21, 2019
1 parent 84f6332 commit 2d4756a
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/stdin.rs
Expand Up @@ -32,10 +32,12 @@ pub trait CommandStdInExt {
///
/// let mut cmd = Command::new("cat");
/// cmd
/// .arg("-et")
/// .arg("-et");
/// cmd
/// .with_stdin()
/// .buffer("42");
/// let output = cmd.unwrap();
/// .buffer("42")
/// .assert()
/// .stdout("42");
/// ```
fn with_stdin(&mut self) -> StdInCommandBuilder;
}
Expand Down Expand Up @@ -66,10 +68,12 @@ impl<'a> StdInCommandBuilder<'a> {
///
/// let mut cmd = Command::new("cat");
/// cmd
/// .arg("-et")
/// .arg("-et");
/// cmd
/// .with_stdin()
/// .buffer("42");
/// let output = cmd.unwrap();
/// .buffer("42")
/// .assert()
/// .stdout("42");
/// ```
///
/// [Command]: https://doc.rust-lang.org/std/process/struct.Command.html
Expand Down Expand Up @@ -97,11 +101,12 @@ impl<'a> StdInCommandBuilder<'a> {
///
/// let mut cmd = Command::new("cat");
/// cmd
/// .arg("-et")
/// .arg("-et");
/// cmd
/// .with_stdin()
/// .path("Cargo.toml")
/// .unwrap();
/// let output = cmd.unwrap();
/// .buffer("42")
/// .assert()
/// .stdout("42");
/// ```
///
/// [Command]: https://doc.rust-lang.org/std/process/struct.Command.html
Expand Down Expand Up @@ -134,9 +139,12 @@ impl<'a> StdInCommandBuilder<'a> {
///
/// let mut cmd = Command::new("cat");
/// cmd
/// .arg("-et");
/// cmd
/// .with_stdin()
/// .buffer("42");
/// let output = cmd.unwrap();
/// .buffer("42")
/// .assert()
/// .stdout("42");
/// ```
///
/// [Command]: https://doc.rust-lang.org/std/process/struct.Command.html
Expand Down

0 comments on commit 2d4756a

Please sign in to comment.