From 609fc1e7604a56e59cb61147698c8181d01ea60d Mon Sep 17 00:00:00 2001 From: n4n5 Date: Mon, 30 Dec 2024 10:11:49 +0100 Subject: [PATCH] clippy --- src/config.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/config.rs b/src/config.rs index e2412a05..0e172add 100644 --- a/src/config.rs +++ b/src/config.rs @@ -258,16 +258,15 @@ pub fn get_config(conf_path: Option) -> Config { Some(path_str) => { let path = Path::new(&path_str); if path.exists() { - match Config::from_config_file(&path) { + match Config::from_config_file(path) { Ok(config) => return config, - Err(e) => eprintln!( - "Ignoring invalid config file ({}): {:?}", - &path.display(), - e - ), + Err(e) => { + eprintln!("Ignoring invalid config file '{}': {}", &path.display(), e) + } } + } else { + eprintln!("Config file {:?} doesn't exists", &path.display()); } - eprintln!("Config file {:?} doesn't exists", &path.display()); } None => { if let Some(home) = directories::BaseDirs::new() {