summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
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
}