Provide more ergonomic env var checking
Co-authored-by: Cole Helbling <cole.helbling@determinate.systems>
This commit is contained in:
parent
06fb14658c
commit
1ee5b1eec8
|
@ -46,5 +46,5 @@ impl Display for Environment {
|
|||
}
|
||||
|
||||
fn env_var_is_true(e: &str) -> bool {
|
||||
&env::var(e).unwrap_or(String::from("")) == "true"
|
||||
std::env::var(e).is_ok_and(|v| v == "true")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue