Remove CommandEnv::apply

It's not being used and uses unsound set_var and remove_var
functions.
This commit is contained in:
Konrad Borowski 2021-12-29 10:07:44 +01:00
parent 8e05bb527c
commit 14fc9dcbba
1 changed files with 0 additions and 16 deletions

View File

@ -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()
}