We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e42cf0e commit ad58e54Copy full SHA for ad58e54
src/test_utils/insta.rs
@@ -12,7 +12,8 @@ macro_rules! assert_snapshot {
12
}
13
14
pub fn settings() -> insta::Settings {
15
- env::set_var("INSTA_WORKSPACE_ROOT", env!("CARGO_MANIFEST_DIR"));
+ // Safety: this is only used in tests, it may panic if used in parallel with other tests.
16
+ unsafe { env::set_var("INSTA_WORKSPACE_ROOT", env!("CARGO_MANIFEST_DIR")) };
17
let mut settings = insta::Settings::clone_current();
18
let cwd = env::current_dir().unwrap();
19
let cwd = cwd.to_str().unwrap();
0 commit comments