1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Fix unsafe attribute used without unsafe

This commit is contained in:
Sylvestre Ledru 2025-03-08 14:39:47 +01:00
parent e0fbced116
commit 2739c19330
6 changed files with 55 additions and 20 deletions

View file

@ -324,7 +324,9 @@ fn test_filter_with_env_var_set() {
RandomFile::new(&at, name).add_lines(n_lines);
let env_var_value = "some-value";
env::set_var("FILE", env_var_value);
unsafe {
env::set_var("FILE", env_var_value);
}
ucmd.args(&[format!("--filter={}", "cat > $FILE").as_str(), name])
.succeeds();