Skip to content

Commit 551b92d

Browse files
committed
fixup! unsafe for env var mutation in tests
Signed-off-by: Sam Gammon <[email protected]>
1 parent d6a7538 commit 551b92d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

crates/oro-config/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,13 @@ mod tests {
195195
#[test]
196196
fn env_configs() -> Result<()> {
197197
let dir = tempdir().into_diagnostic()?;
198-
env::set_var("ORO_CONFIG_STORE", dir.path().display().to_string());
198+
unsafe {
199+
env::set_var("ORO_CONFIG_STORE", dir.path().display().to_string());
200+
}
199201
let config = OroConfigOptions::new().global(false).load()?;
200-
env::remove_var("ORO_CONFIG_STORE");
202+
unsafe {
203+
env::remove_var("ORO_CONFIG_STORE");
204+
}
201205
assert_eq!(
202206
config.get_string("store").into_diagnostic()?,
203207
dir.path().display().to_string()

0 commit comments

Comments
 (0)