summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-09-05 20:36:28 +0100
committerJoe Carstairs <me@joeac.net>2026-09-05 20:36:28 +0100
commit4f7064fe885cc0a0502b526128f588dea2708418 (patch)
treee18ab6ca07ba9f49d65d6a79b30e7e79c01c6b38 /src/config.rs
parent423f5c455e1ed3586f3edf2cd81cd62bd5f91a63 (diff)
replace match with if-let
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs
index b44445b..3dcdf85 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -31,9 +31,8 @@ impl Config {
pub fn find_config() -> Option<Config> {
for path in default_config_file_locations() {
- match Self::parse_config_file_at_path(&path) {
- Ok(config) => { return Some(config); },
- Err(_) => {},
+ if let Ok(config) = Self::parse_config_file_at_path(&path) {
+ return Some(config);
};
};
None