diff options
author | Christian Fochler <mail@christianfochler.de> | 2018-01-28 21:17:03 +0100 |
---|---|---|
committer | Christian Fochler <mail@christianfochler.de> | 2018-01-28 21:17:03 +0100 |
commit | 52ed0762dff1514e0cb970528c6432caea479444 (patch) | |
tree | e9ab24770b0abe5505abf8ec88ab123028235d06 | |
parent | fd22fe75cadbfb203204d2cf52c4e6fb49a957bd (diff) |
adjust examples for new behaviour
-rw-r--r-- | examples/hierarchical-env/src/settings.rs | 4 | ||||
-rw-r--r-- | examples/simple/src/main.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/hierarchical-env/src/settings.rs b/examples/hierarchical-env/src/settings.rs index c908f46..75a9186 100644 --- a/examples/hierarchical-env/src/settings.rs +++ b/examples/hierarchical-env/src/settings.rs @@ -53,9 +53,9 @@ impl Settings { // This file shouldn't be checked in to git s.merge(File::with_name("config/local").required(false))?; - // Add in settings from the environment (with a prefix of APP) + // Add in settings from the environment (with a prefix of APP_) // Eg.. `APP_DEBUG=1 ./target/app` would set the `debug` key - s.merge(Environment::with_prefix("app"))?; + s.merge(Environment::with_prefix("app_"))?; // You may also programmatically change settings s.set("database.url", "postgres://")?; diff --git a/examples/simple/src/main.rs b/examples/simple/src/main.rs index fb66e03..67a1069 100644 --- a/examples/simple/src/main.rs +++ b/examples/simple/src/main.rs @@ -7,9 +7,9 @@ fn main() { settings // Add in `./Settings.toml` .merge(config::File::with_name("Settings")).unwrap() - // Add in settings from the environment (with a prefix of APP) + // Add in settings from the environment (with a prefix of APP_) // Eg.. `APP_DEBUG=1 ./target/app` would set the `debug` key - .merge(config::Environment::with_prefix("APP")).unwrap(); + .merge(config::Environment::with_prefix("APP_")).unwrap(); // Print out our settings (as a HashMap) println!("{:?}", |