Skip to content

Commit

Permalink
Update build.rs (truthy env unwrap suggestion)
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary authored Apr 16, 2020
1 parent b1a7dbe commit c541521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn wasi_processor(out: &mut Testsuite, p: PathBuf) -> Option<Test> {
}

fn is_truthy_env(name: &str) -> bool {
env::var(name).unwrap_or("0".to_string()) == "1"
env::var(name).map(|n| n == "1").unwrap_or_default()
}

fn main() -> anyhow::Result<()> {
Expand Down

0 comments on commit c541521

Please sign in to comment.