From 465a71b6780921fb7ec19682702cbe864decd212 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Sun, 25 Feb 2024 16:54:03 +0100 Subject: Closes #3. Use thiserror. Fix clippy stuff --- src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 78795a3..d28e111 100644 --- a/src/config.rs +++ b/src/config.rs @@ -9,8 +9,8 @@ pub struct Config { impl Config { pub fn load() -> Result { let builder = config::Config::builder() - .add_source(config::File::with_name("~/.config/webol-cli.toml")) - .add_source(config::File::with_name("webol-cli.toml")) + .add_source(config::File::with_name("~/.config/webol-cli").required(false)) + .add_source(config::File::with_name("webol-cli").required(false)) .add_source(config::Environment::with_prefix("WEBOL_CLI_").separator("_")) .build()?; -- cgit v1.2.3