@@ -17,9 +17,9 @@ use quote::quote;
17
17
use rand:: Rng ;
18
18
use rand_xoshiro:: rand_core:: SeedableRng ;
19
19
use syn:: {
20
- parse, parse_macro_input, punctuated:: Punctuated , spanned:: Spanned , FnArg , Ident ,
21
- Item , ItemFn , ItemStatic , Pat , PatIdent , PathArguments , PathSegment , ReturnType , Stmt , Token ,
22
- Type , TypePath , Visibility ,
20
+ parse, parse_macro_input, punctuated:: Punctuated , spanned:: Spanned , FnArg , Ident , Item , ItemFn ,
21
+ ItemStatic , Pat , PatIdent , PathArguments , PathSegment , ReturnType , Stmt , Token , Type , TypePath ,
22
+ Visibility ,
23
23
} ;
24
24
25
25
/// Attribute to declare the entry point of the program
@@ -403,7 +403,12 @@ fn extract_critical_section_arg(
403
403
Ok ( ( None , None ) )
404
404
} else if num_args == 1 {
405
405
if let FnArg :: Typed ( pat_type) = list. first ( ) . unwrap ( ) {
406
- match ( & * pat_type. pat , & * pat_type. ty , pat_type. colon_token , & * pat_type. attrs ) {
406
+ match (
407
+ & * pat_type. pat ,
408
+ & * pat_type. ty ,
409
+ pat_type. colon_token ,
410
+ & * pat_type. attrs ,
411
+ ) {
407
412
(
408
413
Pat :: Ident ( PatIdent {
409
414
ident : name,
@@ -414,7 +419,7 @@ fn extract_critical_section_arg(
414
419
} ) ,
415
420
Type :: Path ( TypePath { qself : None , path } ) ,
416
421
_,
417
- [ ]
422
+ [ ] ,
418
423
) if path. segments . len ( ) == 1 && attrs. len ( ) == 0 => {
419
424
let seg = path. segments . first ( ) . unwrap ( ) ;
420
425
match seg {
0 commit comments