summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-09-05 20:37:39 +0100
committerJoe Carstairs <me@joeac.net>2026-09-05 20:37:39 +0100
commit7995cf1a6df3e602f96c50f03fdd558da87049b5 (patch)
tree393e3d54a332487c85ed6408c451ccae7af0478a /src/config.rs
parent8594f2959cf1f58825b0d6e1fb3c175d87a6e74c (diff)
replace match with if-let
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/config.rs b/src/config.rs
index 5d63bd3..089d3e2 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -12,11 +12,10 @@ pub fn default_config_file_locations() -> Vec<String> {
let mut default_config_file_locations = vec![
String::from("/etc/rss-aggregator.toml"),
];
- match dirs::config_dir().and_then(|config_dir| config_dir.into_string().ok()) {
- Some(config_dir) => {
- default_config_file_locations.push(format!("{config_dir}/rss-aggregator.toml"));
- },
- _ => {},
+ let config_dir = dirs::config_dir()
+ .and_then(|config_dir| config_dir.into_string().ok());
+ if let Some(config_dir) = config_dir {
+ default_config_file_locations.push(format!("{config_dir}/rss-aggregator.toml"));
};
default_config_file_locations
}