make the tasks and resources fields optional

This commit is contained in:
Jorge Aparicio 2017-07-08 21:56:39 -05:00
parent e18eb9610e
commit b7e43c1dbc

View file

@ -130,8 +130,8 @@ pub fn app(input: &str) -> App {
device: device.expect("device field is missing"),
idle: idle.expect("idle field is missing"),
init: init.expect("init field is missing"),
resources: resources.expect("resources field is missing"),
tasks: tasks.expect("tasks field is missing"),
resources: resources.unwrap_or(HashMap::new()),
tasks: tasks.unwrap_or(HashMap::new()),
}
}