archive
/
md-pdf-rs
Archived
1
Fork 0

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
1 changed files with 4 additions and 6 deletions

View File

@ -10,17 +10,15 @@ pub struct Config {
}
impl Config {
}
fn construct(data: String) -> Config {
return serde_yaml::from_str(&data).unwrap();
fn new(raw: String) -> Config {
return serde_yaml::from_str(&raw).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);
}