diff options
| author | Joe Carstairs <me@joeac.net> | 2026-09-05 20:36:28 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-09-05 20:36:28 +0100 |
| commit | 4f7064fe885cc0a0502b526128f588dea2708418 (patch) | |
| tree | e18ab6ca07ba9f49d65d6a79b30e7e79c01c6b38 | |
| parent | 423f5c455e1ed3586f3edf2cd81cd62bd5f91a63 (diff) | |
replace match with if-let
| -rw-r--r-- | src/config.rs | 5 |
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 |
