We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
CommandEnv::apply
1 parent 5ef6128 commit 176d0bfCopy full SHA for 176d0bf
library/std/src/sys/unix/process/process_common.rs
@@ -361,22 +361,6 @@ impl CommandEnv {
361
result
362
}
363
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
-
380
pub fn is_unchanged(&self) -> bool {
381
!self.clear && self.vars.is_empty()
382
0 commit comments