@@ -119,7 +119,8 @@ pub fn interrupt(
119
119
args : proc_macro:: TokenStream ,
120
120
input : proc_macro:: TokenStream ,
121
121
) -> proc_macro:: TokenStream {
122
- let mut f: syn:: ItemFn = syn:: parse ( input) . expect ( "`#[interrupt]` must be applied to a function" ) ;
122
+ let mut f: syn:: ItemFn =
123
+ syn:: parse ( input) . expect ( "`#[interrupt]` must be applied to a function" ) ;
123
124
let args: Vec < _ > = args. into_iter ( ) . collect ( ) ;
124
125
125
126
let fspan = f. span ( ) ;
@@ -176,17 +177,25 @@ pub fn interrupt(
176
177
Ok ( x) => x,
177
178
} ;
178
179
179
- f. sig . ident = syn:: Ident :: new ( & format ! ( "__avr_device_rt_{}" , f. sig. ident) , proc_macro2:: Span :: call_site ( ) ) ;
180
+ f. sig . ident = syn:: Ident :: new (
181
+ & format ! ( "__avr_device_rt_{}" , f. sig. ident) ,
182
+ proc_macro2:: Span :: call_site ( ) ,
183
+ ) ;
180
184
f. sig . inputs . extend ( statics. iter ( ) . map ( |statik| {
181
185
let ident = & statik. ident ;
182
186
let ty = & statik. ty ;
183
187
let attrs = & statik. attrs ;
184
- syn:: parse :: < syn:: FnArg > ( quote:: quote!( #[ allow( non_snake_case) ] #( #attrs) * #ident: & mut #ty) . into ( ) )
185
- . unwrap ( )
188
+ syn:: parse :: < syn:: FnArg > (
189
+ quote:: quote!( #[ allow( non_snake_case) ] #( #attrs) * #ident: & mut #ty) . into ( ) ,
190
+ )
191
+ . unwrap ( )
186
192
} ) ) ;
187
193
f. block . stmts = stmts;
188
194
189
- let tramp_ident = syn:: Ident :: new ( & format ! ( "{}_trampoline" , f. sig. ident) , proc_macro2:: Span :: call_site ( ) ) ;
195
+ let tramp_ident = syn:: Ident :: new (
196
+ & format ! ( "{}_trampoline" , f. sig. ident) ,
197
+ proc_macro2:: Span :: call_site ( ) ,
198
+ ) ;
190
199
let ident = & f. sig . ident ;
191
200
192
201
let resource_args = statics
0 commit comments