From b7e43c1dbcc736b6b1555e5b7219310e61efcf7c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 8 Jul 2017 21:56:39 -0500 Subject: [PATCH] make the tasks and resources fields optional --- macros/src/syntax/parse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/src/syntax/parse.rs b/macros/src/syntax/parse.rs index 056e804a23..19b2511163 100644 --- a/macros/src/syntax/parse.rs +++ b/macros/src/syntax/parse.rs @@ -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()), } }