summaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-02-25 16:54:03 +0100
committerFxQnLr <[email protected]>2024-02-25 16:54:03 +0100
commit465a71b6780921fb7ec19682702cbe864decd212 (patch)
tree66d9a386045a98e95a50d7f84e7e3044b578a163 /src/config.rs
parent03bea24f9de698375033af92a08762446d0e20cc (diff)
downloadwebol-cli-465a71b6780921fb7ec19682702cbe864decd212.tar
webol-cli-465a71b6780921fb7ec19682702cbe864decd212.tar.gz
webol-cli-465a71b6780921fb7ec19682702cbe864decd212.zip
Closes #3. Use thiserror. Fix clippy stuff
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 2 insertions, 2 deletions
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 {
9impl Config { 9impl Config {
10 pub fn load() -> Result<Config, config::ConfigError> { 10 pub fn load() -> Result<Config, config::ConfigError> {
11 let builder = config::Config::builder() 11 let builder = config::Config::builder()
12 .add_source(config::File::with_name("~/.config/webol-cli.toml")) 12 .add_source(config::File::with_name("~/.config/webol-cli").required(false))
13 .add_source(config::File::with_name("webol-cli.toml")) 13 .add_source(config::File::with_name("webol-cli").required(false))
14 .add_source(config::Environment::with_prefix("WEBOL_CLI_").separator("_")) 14 .add_source(config::Environment::with_prefix("WEBOL_CLI_").separator("_"))
15 .build()?; 15 .build()?;
16 16