fix(settings): wrap WebView2 env override in unsafe block for Rust 1.82+
This commit is contained in:
@@ -77,7 +77,11 @@ mod tauri_app {
|
|||||||
tokens.push(arg.to_string());
|
tokens.push(arg.to_string());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::env::set_var(ENV_KEY, tokens.join(" "));
|
// SAFETY: called before any tokio worker or plugin thread spawns, so
|
||||||
|
// no concurrent `getenv` can race. `set_var` is `unsafe` since Rust 1.82.
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var(ENV_KEY, tokens.join(" "));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
|
|||||||
Reference in New Issue
Block a user