diff options
Diffstat (limited to 'src/libstd/sys_common/process.rs')
| -rw-r--r-- | src/libstd/sys_common/process.rs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/libstd/sys_common/process.rs b/src/libstd/sys_common/process.rs index bdf66fca359..55b421794c4 100644 --- a/src/libstd/sys_common/process.rs +++ b/src/libstd/sys_common/process.rs @@ -11,16 +11,12 @@ use crate::sys::process::EnvKey; pub struct CommandEnv { clear: bool, saw_path: bool, - vars: BTreeMap<EnvKey, Option<OsString>> + vars: BTreeMap<EnvKey, Option<OsString>>, } impl Default for CommandEnv { fn default() -> Self { - CommandEnv { - clear: false, - saw_path: false, - vars: Default::default() - } + CommandEnv { clear: false, saw_path: false, vars: Default::default() } } } @@ -64,11 +60,7 @@ impl CommandEnv { } pub fn capture_if_changed(&self) -> Option<BTreeMap<EnvKey, OsString>> { - if self.is_unchanged() { - None - } else { - Some(self.capture()) - } + if self.is_unchanged() { None } else { Some(self.capture()) } } // The following functions build up changes |
