]> git.proxmox.com Git - rustc.git/blobdiff - src/libstd/sys_common/process.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / libstd / sys_common / process.rs
index bdf66fca35970bcc2da56803380f8c5a5f33d25f..55b421794c4130d6b942271e0452b95dbff3cd03 100644 (file)
@@ -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