about summary refs log tree commit diff
path: root/library/test
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-02-13 09:06:00 -0800
committerEric Huss <eric@huss.org>2025-02-13 13:10:27 -0800
commit36733f3bce9102647e8adf9d9a89cabcee9c4cdf (patch)
tree63aedbeda017a3f2e56be9a2975f7c608a21cb67 /library/test
parent1b3940f07fd93fdc779ac958abe7e72bb5b26254 (diff)
downloadrust-36733f3bce9102647e8adf9d9a89cabcee9c4cdf.tar.gz
rust-36733f3bce9102647e8adf9d9a89cabcee9c4cdf.zip
test: Apply deprecated_safe_2024
Diffstat (limited to 'library/test')
-rw-r--r--library/test/src/term/terminfo/searcher/tests.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/test/src/term/terminfo/searcher/tests.rs b/library/test/src/term/terminfo/searcher/tests.rs
index e1edd3b25cf..ff532a97d5e 100644
--- a/library/test/src/term/terminfo/searcher/tests.rs
+++ b/library/test/src/term/terminfo/searcher/tests.rs
@@ -11,7 +11,11 @@ fn test_get_dbpath_for_term() {
     }
     assert_eq!(x("screen"), PathBuf::from("/usr/share/terminfo/s/screen"));
     assert_eq!(get_dbpath_for_term(""), None);
-    env::set_var("TERMINFO_DIRS", ":");
+    unsafe {
+        env::set_var("TERMINFO_DIRS", ":");
+    }
     assert_eq!(x("screen"), PathBuf::from("/usr/share/terminfo/s/screen"));
-    env::remove_var("TERMINFO_DIRS");
+    unsafe {
+        env::remove_var("TERMINFO_DIRS");
+    }
 }