about summary refs log tree commit diff
path: root/library/std/src/process
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-02-13 12:53:52 -0800
committerEric Huss <eric@huss.org>2025-02-13 13:10:28 -0800
commitef20a1b1f8c6dcbeb05da86634ca4516677a31b0 (patch)
tree10e60e7d8ed0b5a83038017a3ea3d9bb358777df /library/std/src/process
parent36733f3bce9102647e8adf9d9a89cabcee9c4cdf (diff)
downloadrust-ef20a1b1f8c6dcbeb05da86634ca4516677a31b0.tar.gz
rust-ef20a1b1f8c6dcbeb05da86634ca4516677a31b0.zip
std: Apply deprecated_safe_2024
Diffstat (limited to 'library/std/src/process')
-rw-r--r--library/std/src/process/tests.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs
index 69273d863eb..5879914ca20 100644
--- a/library/std/src/process/tests.rs
+++ b/library/std/src/process/tests.rs
@@ -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();