summaryrefslogtreecommitdiffstats
path: root/examples/file-toml/src/main.rs
blob: 85db70157d4403e0f0e37c3986666a0cf1362d0f (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.toml"
    c.merge(config::File::new("Settings", config::FileFormat::Toml)).unwrap();

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