File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,11 @@ fn main() {
26
26
let files = expand_dirs ( dirs) ;
27
27
eprintln ! ( "Using {} files" , files. len( ) ) ;
28
28
29
- let start = Instant :: now ( ) ;
30
- minify_all ( files) ;
31
-
32
- eprintln ! ( "Took {:?}" , start. elapsed( ) ) ;
29
+ for i in 0 ..10 {
30
+ let start = Instant :: now ( ) ;
31
+ minify_all ( & files) ;
32
+ eprintln ! ( "{}: Took {:?}" , i, start. elapsed( ) ) ;
33
+ }
33
34
}
34
35
35
36
/// Return the whole input files as abolute path.
@@ -65,11 +66,11 @@ impl Parallel for Worker {
65
66
}
66
67
67
68
#[ inline( never) ] // For profiling
68
- fn minify_all ( files : Vec < PathBuf > ) {
69
+ fn minify_all ( files : & [ PathBuf ] ) {
69
70
GLOBALS . set ( & Default :: default ( ) , || {
70
71
Worker . maybe_par ( 2 , files, |_, path| {
71
72
testing:: run_test ( false , |cm, handler| {
72
- let fm = cm. load_file ( & path) . expect ( "failed to load file" ) ;
73
+ let fm = cm. load_file ( path) . expect ( "failed to load file" ) ;
73
74
74
75
let unresolved_mark = Mark :: new ( ) ;
75
76
let top_level_mark = Mark :: new ( ) ;
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ impl Visit for CharFreqAnalyzer<'_> {
301
301
visit_obj_and_computed ! ( ) ;
302
302
303
303
fn visit_ident ( & mut self , i : & Ident ) {
304
- if i. sym != "arguments" && i. ctxt == self . unresolved_ctxt {
304
+ if i. ctxt == self . unresolved_ctxt && i. sym != "arguments" {
305
305
return ;
306
306
}
307
307
You can’t perform that action at this time.
0 commit comments