Skip to content

Commit 0ca888f

Browse files
committed
kargs: do not set ARCH envvar in tests
std::env::set_var is unsafe in 2024 edition, and upon looking into that this use in the kargs test came up. We don't need to set the environment variable here, in fact I don't think this ever worked in the first place. Signed-off-by: John Eckersberg <[email protected]>
1 parent 5309d5b commit 0ca888f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/kargs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ match-architectures = ["x86_64", "aarch64"]
229229
.to_string();
230230
let parsed_kargs = parse_kargs_toml(&file_content, sys_arch).unwrap();
231231
assert_eq!(parsed_kargs, ["console=tty0", "nosmt"]);
232-
std::env::set_var("ARCH", "aarch64");
232+
let sys_arch = "aarch64";
233233
let parsed_kargs = parse_kargs_toml(&file_content, sys_arch).unwrap();
234234
assert_eq!(parsed_kargs, ["console=tty0", "nosmt"]);
235235
}

0 commit comments

Comments
 (0)