about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstd/process.rs5
-rw-r--r--src/libstd/sys/windows/ext/process.rs16
-rw-r--r--src/libstd/sys/windows/process.rs5
3 files changed, 7 insertions, 19 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 912cc122e92..f41fbcc66b4 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -1180,7 +1180,8 @@ mod tests {
 
         extern "system" {
             fn WaitForDebugEvent(lpDebugEvent: *mut DEBUG_EVENT, dwMilliseconds: DWORD) -> BOOL;
-            fn ContinueDebugEvent(dwProcessId: DWORD, dwThreadId: DWORD, dwContinueStatus: DWORD) -> BOOL;
+            fn ContinueDebugEvent(dwProcessId: DWORD, dwThreadId: DWORD,
+                                  dwContinueStatus: DWORD) -> BOOL;
         }
 
         const DEBUG_PROCESS: DWORD = 1;
@@ -1188,7 +1189,7 @@ mod tests {
         const DBG_EXCEPTION_NOT_HANDLED: DWORD = 0x80010001;
 
         let mut child = Command::new("cmd")
-            .add_creation_flags(DEBUG_PROCESS)
+            .creation_flags(DEBUG_PROCESS)
             .stdin(Stdio::piped()).spawn().unwrap();
         child.stdin.take().unwrap().write_all(b"exit\r\n").unwrap();
         let mut events = 0;
diff --git a/src/libstd/sys/windows/ext/process.rs b/src/libstd/sys/windows/ext/process.rs
index f5bf3354637..0a3221aeae6 100644
--- a/src/libstd/sys/windows/ext/process.rs
+++ b/src/libstd/sys/windows/ext/process.rs
@@ -106,23 +106,13 @@ pub trait CommandExt {
     /// These will always be ORed with `CREATE_UNICODE_ENVIRONMENT`.
     /// [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx
     #[unstable(feature = "windows_process_extensions", issue = "37827")]
-    fn set_creation_flags(&mut self, flags: u32) -> &mut process::Command;
-    /// Add `flags` to the the [process creation flags][1] to be passed to `CreateProcess`.
-    ///
-    /// These will always be ORed with `CREATE_UNICODE_ENVIRONMENT`.
-    /// [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx
-    #[unstable(feature = "windows_process_extensions", issue = "37827")]
-    fn add_creation_flags(&mut self, flags: u32) -> &mut process::Command;
+    fn creation_flags(&mut self, flags: u32) -> &mut process::Command;
 }
 
 #[unstable(feature = "windows_process_extensions", issue = "37827")]
 impl CommandExt for process::Command {
-    fn set_creation_flags(&mut self, flags: u32) -> &mut process::Command {
-        self.as_inner_mut().set_creation_flags(flags);
-        self
-    }
-    fn add_creation_flags(&mut self, flags: u32) -> &mut process::Command {
-        self.as_inner_mut().add_creation_flags(flags);
+    fn creation_flags(&mut self, flags: u32) -> &mut process::Command {
+        self.as_inner_mut().creation_flags(flags);
         self
     }
 }
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index a221c67efd9..969de6b85a6 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -126,12 +126,9 @@ impl Command {
     pub fn stderr(&mut self, stderr: Stdio) {
         self.stderr = Some(stderr);
     }
-    pub fn set_creation_flags(&mut self, flags: u32) {
+    pub fn creation_flags(&mut self, flags: u32) {
         self.flags = flags;
     }
-    pub fn add_creation_flags(&mut self, flags: u32) {
-        self.flags = self.flags | flags;
-    }
 
     pub fn spawn(&mut self, default: Stdio, needs_stdin: bool)
                  -> io::Result<(Process, StdioPipes)> {