@@ -745,10 +745,10 @@ impl fmt::Debug for Output {
745
745
/// Describes what to do with a standard I/O stream for a child process when
746
746
/// passed to the [`stdin`], [`stdout`], and [`stderr`] methods of [`Command`].
747
747
///
748
- /// [`stdin`]: ./ struct.Command.html#method.stdin
749
- /// [`stdout`]: ./ struct.Command.html#method.stdout
750
- /// [`stderr`]: ./ struct.Command.html#method.stderr
751
- /// [`Command`]: ./ struct.Command.html
748
+ /// [`stdin`]: struct.Command.html#method.stdin
749
+ /// [`stdout`]: struct.Command.html#method.stdout
750
+ /// [`stderr`]: struct.Command.html#method.stderr
751
+ /// [`Command`]: struct.Command.html
752
752
#[ stable( feature = "process" , since = "1.0.0" ) ]
753
753
pub struct Stdio ( imp:: Stdio ) ;
754
754
@@ -783,12 +783,12 @@ impl Stdio {
783
783
/// .stdout(Stdio::piped())
784
784
/// .spawn()
785
785
/// .expect("Failed to spawn child process");
786
- ///
786
+ ///
787
787
/// {
788
788
/// let mut stdin = child.stdin.as_mut().expect("Failed to open stdin");
789
789
/// stdin.write_all("Hello, world!".as_bytes()).expect("Failed to write to stdin");
790
790
/// }
791
- ///
791
+ ///
792
792
/// let output = child.wait_with_output().expect("Failed to read stdout");
793
793
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "!dlrow ,olleH\n");
794
794
/// ```
@@ -818,13 +818,13 @@ impl Stdio {
818
818
///
819
819
/// ```no_run
820
820
/// use std::process::{Command, Stdio};
821
- ///
821
+ ///
822
822
/// let output = Command::new("rev")
823
823
/// .stdin(Stdio::inherit())
824
824
/// .stdout(Stdio::piped())
825
825
/// .output()
826
826
/// .expect("Failed to execute command");
827
- ///
827
+ ///
828
828
/// println!("You piped in the reverse of: {}", String::from_utf8_lossy(&output.stdout));
829
829
/// ```
830
830
#[ stable( feature = "process" , since = "1.0.0" ) ]
@@ -854,13 +854,13 @@ impl Stdio {
854
854
///
855
855
/// ```no_run
856
856
/// use std::process::{Command, Stdio};
857
- ///
857
+ ///
858
858
/// let output = Command::new("rev")
859
859
/// .stdin(Stdio::null())
860
860
/// .stdout(Stdio::piped())
861
861
/// .output()
862
862
/// .expect("Failed to execute command");
863
- ///
863
+ ///
864
864
/// assert_eq!(String::from_utf8_lossy(&output.stdout), "");
865
865
/// // Ignores any piped-in input
866
866
/// ```
0 commit comments