summaryrefslogtreecommitdiffstats
path: root/examples/file-yaml/src/main.rs
blob: 6d729766d46b9d799d404163d8b2919080ade0b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
extern crate config;

fn main() {
    let mut c = config::Config::new();

    // Read configuration from "Settings.yaml"
    c.merge(config::File::new("Settings", config::FileFormat::Yaml)).unwrap();

    println!("debug  = {:?}", c.get("debug"));
    println!("pi     = {:?}", c.get("pi"));
    println!("weight = {:?}", c.get("weight"));
}