diff --git a/src/config/mod.rs b/src/config/mod.rs index 464c026..77d32b5 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -15,7 +15,7 @@ pub struct Config { impl Config { fn new(raw: Value) -> Config { return Config { - input: read::get_input_files(raw), + input: read::get_input_files(&raw), ..Default::default() }; } diff --git a/src/config/read.rs b/src/config/read.rs index 510f0fc..d5f217a 100644 --- a/src/config/read.rs +++ b/src/config/read.rs @@ -22,7 +22,7 @@ pub fn read() -> String { } -pub fn get_input_files(conf: Value) -> Vec { +pub fn get_input_files(conf: &Value) -> Vec { let working_dir = current_dir().unwrap(); let input_values = conf.get("input").unwrap().as_sequence().unwrap().to_vec(); return input_values.into_iter().map(|x| working_dir.join(x.as_str().unwrap().to_string())).collect();