diff options
author | 2023-01-08 21:30:53 +0100 | |
---|---|---|
committer | 2023-03-01 00:33:29 +0100 | |
commit | c40c89bb4edc22c4a60d8677c660a9ab7eb47e92 (patch) | |
tree | 3ba72592f324dd7bef32773211b093e4949d6ff0 /macros/src/codegen/main.rs | |
parent | 6d252785e83218eeb5d080836281c90b86ca0e03 (diff) | |
download | rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.tar.gz rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.tar.zst rtic-c40c89bb4edc22c4a60d8677c660a9ab7eb47e92.zip |
Clippy fixes
Diffstat (limited to 'macros/src/codegen/main.rs')
-rw-r--r-- | macros/src/codegen/main.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/macros/src/codegen/main.rs b/macros/src/codegen/main.rs index 8e7138f4..2775d259 100644 --- a/macros/src/codegen/main.rs +++ b/macros/src/codegen/main.rs @@ -15,15 +15,13 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { let call_idle = if let Some(idle) = &app.idle { let name = &idle.name; quote!(#name(#name::Context::new())) + } else if analysis.channels.get(&0).is_some() { + let dispatcher = util::zero_prio_dispatcher_ident(); + quote!(#dispatcher();) } else { - if analysis.channels.get(&0).is_some() { - let dispatcher = util::zero_prio_dispatcher_ident(); - quote!(#dispatcher();) - } else { - quote!(loop { - rtic::export::nop() - }) - } + quote!(loop { + rtic::export::nop() + }) }; let main = util::suffixed("main"); |