Skip to content

Commit 176d0bf

Browse files
committed
Remove unused CommandEnv::apply
1 parent 5ef6128 commit 176d0bf

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

library/std/src/sys/unix/process/process_common.rs

-16
Original file line numberDiff line numberDiff line change
@@ -361,22 +361,6 @@ impl CommandEnv {
361361
result
362362
}
363363

364-
// Apply these changes directly to the current environment
365-
pub fn apply(&self) {
366-
if self.clear {
367-
for (k, _) in env::vars_os() {
368-
env::remove_var(k);
369-
}
370-
}
371-
for (key, maybe_val) in self.vars.iter() {
372-
if let Some(ref val) = maybe_val {
373-
env::set_var(key, val);
374-
} else {
375-
env::remove_var(key);
376-
}
377-
}
378-
}
379-
380364
pub fn is_unchanged(&self) -> bool {
381365
!self.clear && self.vars.is_empty()
382366
}

0 commit comments

Comments
 (0)