Skip to content

Commit

Permalink
refactor: Use Option::map()
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsan committed Jun 30, 2023
1 parent 21cd5d6 commit 913bdd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ fn get_config_paths(filename: &str) -> Vec<PathBuf> {

#[cfg(target_os = "windows")]
fn get_global_config_path() -> Option<PathBuf> {
std::env::var_os("PROGRAMDATA").map_or(None, |program_data| {
std::env::var_os("PROGRAMDATA").map(|program_data| {
let mut path = PathBuf::from(program_data);
path.push(r"rustic\config");
Some(path)
path
})
}

Expand Down

0 comments on commit 913bdd2

Please sign in to comment.