File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ impl PacEnumItem {
121
121
} ;
122
122
for v in variants. iter ( ) {
123
123
let ident = v. ident . clone ( ) ;
124
- let value = match v. discriminant . as_ref ( ) {
124
+ let value = match v. discriminant . as_ref ( ) {
125
125
Some ( ( _, syn:: Expr :: Lit ( expr_lit) ) ) => match & expr_lit. lit {
126
126
syn:: Lit :: Int ( lit_int) => {
127
127
lit_int. base10_parse :: < usize > ( ) . unwrap_or_else ( |_| {
@@ -291,13 +291,9 @@ core::arch::global_asm!("
291
291
fn DefaultHandler ( ) ;
292
292
}
293
293
294
- if code < #isr_array_name. len( ) {
295
- match & #isr_array_name[ code] {
296
- Some ( handler) => handler( ) ,
297
- None => DefaultHandler ( ) ,
298
- }
299
- } else {
300
- DefaultHandler ( ) ;
294
+ match #isr_array_name. get( code) {
295
+ Some ( Some ( handler) ) => handler( ) ,
296
+ _ => DefaultHandler ( ) ,
301
297
}
302
298
}
303
299
} ) ;
You can’t perform that action at this time.
0 commit comments