use std::fs::File; use std::io::prelude::*; use toml; pub type Config = toml::Value; pub fn load(path: &str) -> Config { let mut text = String::new(); let mut f = File::open(path).unwrap(); f.read_to_string(&mut text).ok().expect("Failed to load config"); let value = text.parse::().unwrap(); value }