use ::new standard

This commit is contained in:
Jake Howard 2017-07-17 14:53:18 +01:00
parent 68f7233cd9
commit 2dd56871ef
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -10,17 +10,15 @@ pub struct Config {
}
impl Config {
fn new(raw: String) -> Config {
return serde_yaml::from_str(&raw).unwrap();
}
fn construct(data: String) -> Config {
return serde_yaml::from_str(&data).unwrap();
}
pub fn get_config() {
let config_str = read::read();
let config = construct(config_str);
let config = Config::new(config_str);
println!("{:?}", config);
validate::validate(config);
}