File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ macro_rules! pass {
20
20
} ;
21
21
}
22
22
23
- static PASSES : [ PostProcessingPass ; 2 ] =
24
- [ pass ! ( merge_extern_blocks) , pass ! ( sort_semantically) ] ;
23
+ const PASSES : & ' static [ PostProcessingPass ] =
24
+ & [ pass ! ( merge_extern_blocks) , pass ! ( sort_semantically) ] ;
25
25
26
26
pub ( crate ) fn postprocessing (
27
27
items : Vec < TokenStream > ,
@@ -43,13 +43,12 @@ pub(crate) fn postprocessing(
43
43
// The first one won't panic because we build the `mod` and know it is there
44
44
// The second one won't panic because we know original output has something in
45
45
// it already.
46
- let mut items = syn:: parse2 :: < syn:: ItemMod > ( module_wrapped_tokens)
46
+ let ( _ , mut items) = syn:: parse2 :: < syn:: ItemMod > ( module_wrapped_tokens)
47
47
. unwrap ( )
48
48
. content
49
- . unwrap ( )
50
- . 1 ;
49
+ . unwrap ( ) ;
51
50
52
- for pass in PASSES . iter ( ) {
51
+ for pass in PASSES {
53
52
if ( pass. should_run ) ( options) {
54
53
( pass. run ) ( & mut items) ;
55
54
}
You can’t perform that action at this time.
0 commit comments