Skip to content

Commit

Permalink
Use unwrap_or_default
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Oct 9, 2023
1 parent f674c6f commit bb17415
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ impl Config {
};

let unstable = matches.is_present(arg::UNSTABLE)
|| std::env::var_os("JUST_UNSTABLE").map_or(false, |val| {
!["false", "0", ""].contains(&val.to_string_lossy().as_ref())
});
|| std::env::var_os("JUST_UNSTABLE")
.map(|val| !["false", "0", ""].contains(&val.to_string_lossy().as_ref()))
.unwrap_or_default();

Ok(Self {
check: matches.is_present(arg::CHECK),
Expand Down

0 comments on commit bb17415

Please sign in to comment.