]> git.lizzy.rs Git - rust.git/commitdiff
Fix the std::process::Stdio constructors
authorKevin Ballard <kevin@sb.org>
Tue, 24 Feb 2015 05:41:27 +0000 (21:41 -0800)
committerKevin Ballard <kevin@sb.org>
Tue, 24 Feb 2015 05:41:27 +0000 (21:41 -0800)
There are no tests for this because testing inherit/null is tricky.
Probably why there weren't tests for it to begin with.

src/libstd/process.rs

index 86604f62171ef073369a56646de779961ba80c38..c24b08deec2dc482d8395a7038214f22fc7762c9 100644 (file)
@@ -355,11 +355,11 @@ impl Stdio {
     pub fn capture() -> Stdio { Stdio(StdioImp::Capture) }
 
     /// The child inherits from the corresponding parent descriptor.
-    pub fn inherit() -> Stdio { Stdio(StdioImp::Capture) }
+    pub fn inherit() -> Stdio { Stdio(StdioImp::Inherit) }
 
     /// This stream will be ignored. This is the equivalent of attaching the
     /// stream to `/dev/null`
-    pub fn null() -> Stdio { Stdio(StdioImp::Capture) }
+    pub fn null() -> Stdio { Stdio(StdioImp::Null) }
 }
 
 /// Describes the result of a process after it has terminated.