about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2016-11-30 21:31:47 -0500
committerTed Mielczarek <ted@mielczarek.org>2016-11-30 21:31:47 -0500
commite6975e974841c59a6e67e8a158b306f29d35d513 (patch)
treebe993b80b13cb487957ef14f31ec3bbf1b281c63 /src/libstd/sys/windows
parent8b1c4cbbaf0252ed68f62b0613a8da9725141262 (diff)
downloadrust-e6975e974841c59a6e67e8a158b306f29d35d513.tar.gz
rust-e6975e974841c59a6e67e8a158b306f29d35d513.zip
just add one method named creation_flags, fix the tidy error
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/ext/process.rs16
-rw-r--r--src/libstd/sys/windows/process.rs5
2 files changed, 4 insertions, 17 deletions
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)> {