diff --git a/src/config.rs b/src/config.rs index 59026f1..7d99b84 100644 --- a/src/config.rs +++ b/src/config.rs @@ -49,9 +49,7 @@ pub fn load_config(file_path: &str) -> Config { Err(_) => exit_with_error(&format!("Failed to open configuration file '{}'", file_path)) }; - let reader = BufReader::new(file); - - match serde_json::from_reader::, Config>(reader) { + match serde_json::from_reader(BufReader::new(file)) { Ok(config) => check_config(config), Err(_) => exit_with_error(&format!("Failed to parse configuration file '{}'", file_path)) }