diff options
author | 2017-07-08 21:56:39 -0500 | |
---|---|---|
committer | 2017-07-08 21:56:39 -0500 | |
commit | b7e43c1dbcc736b6b1555e5b7219310e61efcf7c (patch) | |
tree | 20f90854454b598e89ba42b1f7711e636bbf6397 /macros/src/syntax | |
parent | e18eb9610ea2acab0116a211b6e3ed0d99a2570d (diff) | |
download | rtic-b7e43c1dbcc736b6b1555e5b7219310e61efcf7c.tar.gz rtic-b7e43c1dbcc736b6b1555e5b7219310e61efcf7c.tar.zst rtic-b7e43c1dbcc736b6b1555e5b7219310e61efcf7c.zip |
make the tasks and resources fields optional
Diffstat (limited to 'macros/src/syntax')
-rw-r--r-- | macros/src/syntax/parse.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/syntax/parse.rs b/macros/src/syntax/parse.rs index 056e804a..19b25111 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()), } } |