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 {
121121 } ;
122122 for v in variants. iter ( ) {
123123 let ident = v. ident . clone ( ) ;
124- let value = match v. discriminant . as_ref ( ) {
124+ let value = match v. discriminant . as_ref ( ) {
125125 Some ( ( _, syn:: Expr :: Lit ( expr_lit) ) ) => match & expr_lit. lit {
126126 syn:: Lit :: Int ( lit_int) => {
127127 lit_int. base10_parse :: < usize > ( ) . unwrap_or_else ( |_| {
@@ -291,13 +291,9 @@ core::arch::global_asm!("
291291 fn DefaultHandler ( ) ;
292292 }
293293
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 ( ) ,
301297 }
302298 }
303299 } ) ;
You can’t perform that action at this time.
0 commit comments