diff options
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index ebd0820669c..df8a5d27c7f 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -147,7 +147,7 @@ impl Command { /// Builder methods are provided to change these defaults and /// otherwise configure the process. #[stable(feature = "process", since = "1.0.0")] - pub fn new<S: AsOsStr + ?Sized>(program: &S) -> Command { + pub fn new<S: AsOsStr>(program: S) -> Command { Command { inner: CommandImp::new(program.as_os_str()), stdin: None, @@ -158,7 +158,7 @@ impl Command { /// Add an argument to pass to the program. #[stable(feature = "process", since = "1.0.0")] - pub fn arg<S: AsOsStr + ?Sized>(&mut self, arg: &S) -> &mut Command { + pub fn arg<S: AsOsStr>(&mut self, arg: S) -> &mut Command { self.inner.arg(arg.as_os_str()); self } @@ -175,7 +175,7 @@ impl Command { /// Note that environment variable names are case-insensitive (but case-preserving) on Windows, /// and case-sensitive on all other platforms. #[stable(feature = "process", since = "1.0.0")] - pub fn env<K: ?Sized, V: ?Sized>(&mut self, key: &K, val: &V) -> &mut Command + pub fn env<K, V>(&mut self, key: K, val: V) -> &mut Command where K: AsOsStr, V: AsOsStr { self.inner.env(key.as_os_str(), val.as_os_str()); @@ -184,7 +184,7 @@ impl Command { /// Removes an environment variable mapping. #[stable(feature = "process", since = "1.0.0")] - pub fn env_remove<K: ?Sized + AsOsStr>(&mut self, key: &K) -> &mut Command { + pub fn env_remove<K: AsOsStr>(&mut self, key: K) -> &mut Command { self.inner.env_remove(key.as_os_str()); self } @@ -198,7 +198,7 @@ impl Command { /// Set the working directory for the child process. #[stable(feature = "process", since = "1.0.0")] - pub fn current_dir<P: AsPath + ?Sized>(&mut self, dir: &P) -> &mut Command { + pub fn current_dir<P: AsPath>(&mut self, dir: P) -> &mut Command { self.inner.cwd(dir.as_path().as_os_str()); self } @@ -533,7 +533,7 @@ mod tests { use io::prelude::*; use prelude::v1::{Ok, Err, drop, Some, Vec}; use prelude::v1::{String, Clone}; - use prelude::v1::{SliceExt, Str, StrExt, AsSlice, ToString, GenericPath}; + use prelude::v1::{Str, AsSlice, ToString, GenericPath}; use old_path; use old_io::fs::PathExtensions; use rt::running_on_valgrind; @@ -573,7 +573,7 @@ mod tests { #[cfg(all(unix, not(target_os="android")))] #[test] fn signal_reported_right() { - use os::unix::ExitStatusExt; + use os::unix::process::ExitStatusExt; let p = Command::new("/bin/sh").arg("-c").arg("kill -9 $$").spawn(); assert!(p.is_ok()); @@ -633,7 +633,7 @@ mod tests { #[cfg(all(unix, not(target_os="android")))] #[test] fn uid_works() { - use os::unix::*; + use os::unix::prelude::*; use libc; let mut p = Command::new("/bin/sh") .arg("-c").arg("true") @@ -646,7 +646,7 @@ mod tests { #[cfg(all(unix, not(target_os="android")))] #[test] fn uid_to_root_fails() { - use os::unix::*; + use os::unix::prelude::*; use libc; // if we're already root, this isn't a valid test. Most of the bots run |
