mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 14:25:18 +01:00
Since there only will be one init/idle use .first().unwrap(), matching rtic-syntax
This commit is contained in:
parent
f151d5871c
commit
d8c9476372
5 changed files with 9 additions and 18 deletions
|
|
@ -14,8 +14,8 @@ pub fn codegen(
|
|||
let mut lt = None;
|
||||
|
||||
let resources = match ctxt {
|
||||
Context::Init => &app.inits[0].args.resources,
|
||||
Context::Idle => &app.idles[0].args.resources,
|
||||
Context::Init => &app.inits.first().unwrap().args.resources,
|
||||
Context::Idle => &app.idles.first().unwrap().args.resources,
|
||||
Context::HardwareTask(name) => &app.hardware_tasks[name].args.resources,
|
||||
Context::SoftwareTask(name) => &app.software_tasks[name].args.resources,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue