diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2017-02-12 10:02:07 -0800 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2017-02-12 10:02:07 -0800 |
commit | ccae9b09fa9d4650de3cf91013162a7277e46060 (patch) | |
tree | f2ff7c58a32f5418b48dd8327e6c45b74d20356c /examples/file-yaml/src/main.rs | |
parent | bcd0737e15726f3ad324c3cf26c5d04fe5f75766 (diff) |
Remove global API
Diffstat (limited to 'examples/file-yaml/src/main.rs')
-rw-r--r-- | examples/file-yaml/src/main.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/file-yaml/src/main.rs b/examples/file-yaml/src/main.rs index cd3286f..6d72976 100644 --- a/examples/file-yaml/src/main.rs +++ b/examples/file-yaml/src/main.rs @@ -1,10 +1,12 @@ extern crate config; fn main() { + let mut c = config::Config::new(); + // Read configuration from "Settings.yaml" - config::merge(config::File::new("Settings", config::FileFormat::Yaml)).unwrap(); + c.merge(config::File::new("Settings", config::FileFormat::Yaml)).unwrap(); - println!("debug = {:?}", config::get("debug")); - println!("pi = {:?}", config::get("pi")); - println!("weight = {:?}", config::get("weight")); + println!("debug = {:?}", c.get("debug")); + println!("pi = {:?}", c.get("pi")); + println!("weight = {:?}", c.get("weight")); } |