diff options
author | 2022-09-21 21:33:31 +0200 | |
---|---|---|
committer | 2022-09-24 14:07:33 +0200 | |
commit | 1341cc5bbe912d3cafcdd87f30ff75627829f0f5 (patch) | |
tree | d0a9569a2cf34cb59c0932709d219ecfac56cfad /macros/src/codegen/local_resources_struct.rs | |
parent | b1d499a74416ce03bde2d88b6944f64a5cd55f26 (diff) | |
download | rtic-1341cc5bbe912d3cafcdd87f30ff75627829f0f5.tar.gz rtic-1341cc5bbe912d3cafcdd87f30ff75627829f0f5.tar.zst rtic-1341cc5bbe912d3cafcdd87f30ff75627829f0f5.zip |
Broke out async dispatchers into their own place
Diffstat (limited to 'macros/src/codegen/local_resources_struct.rs')
-rw-r--r-- | macros/src/codegen/local_resources_struct.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/macros/src/codegen/local_resources_struct.rs b/macros/src/codegen/local_resources_struct.rs index b7eae3f9..ed5577c9 100644 --- a/macros/src/codegen/local_resources_struct.rs +++ b/macros/src/codegen/local_resources_struct.rs @@ -13,7 +13,13 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, let resources = match ctxt { Context::Init => &app.init.args.local_resources, - Context::Idle => &app.idle.as_ref().unwrap().args.local_resources, + Context::Idle => { + &app.idle + .as_ref() + .expect("RTIC-ICE: unable to get idle name") + .args + .local_resources + } Context::HardwareTask(name) => &app.hardware_tasks[name].args.local_resources, Context::SoftwareTask(name) => &app.software_tasks[name].args.local_resources, }; |