diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2019-02-26 23:25:16 +0100 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2019-02-26 23:25:16 +0100 |
| commit | 8eccef7d9cda8a60594b86d31b656a3680d1ca16 (patch) | |
| tree | ee9aa60d3c109b4583299cf6a71277507a4be241 /macros/src/check.rs | |
| parent | 2fd6ae69d1c79635896b643b1094b3805d1ec6c2 (diff) | |
refactor: make `binds` harder to misuse
Diffstat (limited to 'macros/src/check.rs')
| -rw-r--r-- | macros/src/check.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/macros/src/check.rs b/macros/src/check.rs index ab86461..4adc2c1 100644 --- a/macros/src/check.rs +++ b/macros/src/check.rs @@ -106,12 +106,8 @@ pub fn app(app: &App) -> parse::Result<()> { } // Check that free interrupts are not being used - for (name, interrupt) in &app.interrupts { - let name = if let Some(ref binds) = interrupt.args.binds { - binds - } else { - name - }; + for (handler, interrupt) in &app.interrupts { + let name = interrupt.args.binds(handler); if app.free_interrupts.contains_key(name) { return Err(parse::Error::new( |
