summaryrefslogtreecommitdiffstats
path: root/examples/hierarchical-env/src/settings.rs
diff options
context:
space:
mode:
authorJoel Gallant <joel@joelgallant.me>2020-09-03 12:06:08 -0600
committerGitHub <noreply@github.com>2020-09-03 12:06:08 -0600
commit436c964037a1833fe6d17eda37e25425af7e9760 (patch)
tree5e6468c43f2f06fca2a338839a3d7a80e4d67d49 /examples/hierarchical-env/src/settings.rs
parent2c0b201055be60ec45e258adcc6c4b6e01bcd627 (diff)
parente84a39949c0c1625c1886b8f718b8165c7a8e831 (diff)
Merge pull request #134 from eisterman/fix_clippy_warnings
Fix of all the clippy warnings and removing of deprecated Error::description method
Diffstat (limited to 'examples/hierarchical-env/src/settings.rs')
-rw-r--r--examples/hierarchical-env/src/settings.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/hierarchical-env/src/settings.rs b/examples/hierarchical-env/src/settings.rs
index c908f46..ad23163 100644
--- a/examples/hierarchical-env/src/settings.rs
+++ b/examples/hierarchical-env/src/settings.rs
@@ -46,7 +46,7 @@ impl Settings {
// Add in the current environment file
// Default to 'development' env
// Note that this file is _optional_
- let env = env::var("RUN_MODE").unwrap_or("development".into());
+ let env = env::var("RUN_MODE").unwrap_or_else(|_| "development".into());
s.merge(File::with_name(&format!("config/{}", env)).required(false))?;
// Add in a local configuration file