mirror of
https://github.com/SinTan1729/movie-rename.git
synced 2024-12-25 03:48:35 -06:00
fix: No need for the unwrap_or()s
This commit is contained in:
parent
67dcd9e378
commit
b4073357f7
1 changed files with 3 additions and 3 deletions
|
@ -11,9 +11,9 @@ mod structs;
|
|||
async fn main() {
|
||||
// Process the passed arguments
|
||||
let (entries, settings) = process_args();
|
||||
let flag_dry_run = *settings.get("dry-run").unwrap_or(&false);
|
||||
let flag_directory = *settings.get("directory").unwrap_or(&false);
|
||||
let flag_lucky = *settings.get("i-feel-lucky").unwrap_or(&false);
|
||||
let flag_dry_run = settings["dry-run"];
|
||||
let flag_directory = settings["directory"];
|
||||
let flag_lucky = settings["i-feel-lucky"];
|
||||
|
||||
// Try to read config file, or display error
|
||||
let mut config_file = env::var("XDG_CONFIG_HOME").unwrap_or(String::from("$HOME"));
|
||||
|
|
Loading…
Reference in a new issue