diff options
author | 2022-02-18 19:38:48 +0100 | |
---|---|---|
committer | 2022-02-22 18:56:21 +0100 | |
commit | 5ed93bd1bf056f1d2b8632502300d7488df4e9df (patch) | |
tree | 2e1bf40e2eaeeb4b58c996c1659c8a7429e2a518 /macros/src/codegen/pre_init.rs | |
parent | 57da1e0403510cafbdcf88e402b39ae6d3bf323e (diff) | |
download | rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.tar.gz rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.tar.zst rtic-5ed93bd1bf056f1d2b8632502300d7488df4e9df.zip |
Clippy with pedantic suggestions
Diffstat (limited to 'macros/src/codegen/pre_init.rs')
-rw-r--r-- | macros/src/codegen/pre_init.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs index 7aaf20fc..91c99912 100644 --- a/macros/src/codegen/pre_init.rs +++ b/macros/src/codegen/pre_init.rs @@ -41,12 +41,12 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream let interrupt_ids = analysis.interrupts.iter().map(|(p, (id, _))| (p, id)); // Unmask interrupts and set their priorities - for (&priority, name) in interrupt_ids.chain(app.hardware_tasks.values().flat_map(|task| { - if !util::is_exception(&task.args.binds) { - Some((&task.args.priority, &task.args.binds)) - } else { + for (&priority, name) in interrupt_ids.chain(app.hardware_tasks.values().filter_map(|task| { + if util::is_exception(&task.args.binds) { // We do exceptions in another pass None + } else { + Some((&task.args.priority, &task.args.binds)) } })) { // Compile time assert that this priority is supported by the device |