fix: No need for the unwrap_or()s

This commit is contained in:
Sayantan Santra 2024-03-06 03:02:53 -06:00
parent 67dcd9e378
commit b4073357f7
Signed by: SinTan1729
GPG Key ID: EB3E68BFBA25C85F
1 changed files with 3 additions and 3 deletions

View File

@ -11,9 +11,9 @@ mod structs;
async fn main() { async fn main() {
// Process the passed arguments // Process the passed arguments
let (entries, settings) = process_args(); let (entries, settings) = process_args();
let flag_dry_run = *settings.get("dry-run").unwrap_or(&false); let flag_dry_run = settings["dry-run"];
let flag_directory = *settings.get("directory").unwrap_or(&false); let flag_directory = settings["directory"];
let flag_lucky = *settings.get("i-feel-lucky").unwrap_or(&false); let flag_lucky = settings["i-feel-lucky"];
// Try to read config file, or display error // Try to read config file, or display error
let mut config_file = env::var("XDG_CONFIG_HOME").unwrap_or(String::from("$HOME")); let mut config_file = env::var("XDG_CONFIG_HOME").unwrap_or(String::from("$HOME"));