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

View file

@ -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"));