diff options
| author | Konrad Borowski <konrad@borowski.pw> | 2021-12-29 10:07:44 +0100 |
|---|---|---|
| committer | Konrad Borowski <konrad@borowski.pw> | 2021-12-29 10:07:44 +0100 |
| commit | 14fc9dcbba8a92a77074659df2fab2f090204a42 (patch) | |
| tree | 05a77a817463c792c1501e6b8c2a99f71ad20d7f /library/std/src/sys_common/process.rs | |
| parent | 8e05bb527c5f00549ea6bc21352638200bceb1a5 (diff) | |
| download | rust-14fc9dcbba8a92a77074659df2fab2f090204a42.tar.gz rust-14fc9dcbba8a92a77074659df2fab2f090204a42.zip | |
Remove CommandEnv::apply
It's not being used and uses unsound set_var and remove_var functions.
Diffstat (limited to 'library/std/src/sys_common/process.rs')
| -rw-r--r-- | library/std/src/sys_common/process.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/library/std/src/sys_common/process.rs b/library/std/src/sys_common/process.rs index 2cd1e29f6c4..9f978789a62 100644 --- a/library/std/src/sys_common/process.rs +++ b/library/std/src/sys_common/process.rs @@ -39,22 +39,6 @@ impl CommandEnv { result } - // Apply these changes directly to the current environment - pub fn apply(&self) { - if self.clear { - for (k, _) in env::vars_os() { - env::remove_var(k); - } - } - for (key, maybe_val) in self.vars.iter() { - if let Some(ref val) = maybe_val { - env::set_var(key, val); - } else { - env::remove_var(key); - } - } - } - pub fn is_unchanged(&self) -> bool { !self.clear && self.vars.is_empty() } |
