1
Fork 0

std: Apply deprecated_safe_2024

This commit is contained in:
Eric Huss 2025-02-13 12:53:52 -08:00
parent 36733f3bce
commit ef20a1b1f8
5 changed files with 66 additions and 42 deletions

View file

@ -323,9 +323,13 @@ fn test_capture_env_at_spawn() {
// This variable will not be present if the environment has already
// been captured above.
env::set_var("RUN_TEST_NEW_ENV2", "456");
unsafe {
env::set_var("RUN_TEST_NEW_ENV2", "456");
}
let result = cmd.output().unwrap();
env::remove_var("RUN_TEST_NEW_ENV2");
unsafe {
env::remove_var("RUN_TEST_NEW_ENV2");
}
let output = String::from_utf8_lossy(&result.stdout).to_string();