File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ where
159159 return summ5;
160160 }
161161
162- total_run = total_run + loop_run;
162+ total_run += loop_run;
163163 // Longest we ever run for is 3s.
164164 if total_run > Duration :: from_secs ( 3 ) {
165165 return summ5;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl<T: Write> PrettyFormatter<T> {
139139 stdouts. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
140140 let output = String :: from_utf8_lossy ( stdout) ;
141141 stdouts. push_str ( & output) ;
142- stdouts. push_str ( " \n " ) ;
142+ stdouts. push ( '\n' ) ;
143143 }
144144 }
145145 if !stdouts. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ impl<T: Write> TerseFormatter<T> {
114114 stdouts. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
115115 let output = String :: from_utf8_lossy ( stdout) ;
116116 stdouts. push_str ( & output) ;
117- stdouts. push_str ( " \n " ) ;
117+ stdouts. push ( '\n' ) ;
118118 }
119119 }
120120 if !stdouts. is_empty ( ) {
@@ -140,7 +140,7 @@ impl<T: Write> TerseFormatter<T> {
140140 fail_out. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
141141 let output = String :: from_utf8_lossy ( stdout) ;
142142 fail_out. push_str ( & output) ;
143- fail_out. push_str ( " \n " ) ;
143+ fail_out. push ( '\n' ) ;
144144 }
145145 }
146146 if !fail_out. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -237,11 +237,9 @@ where
237237 let event = TestEvent :: TeFiltered ( filtered_descs) ;
238238 notify_about_test_event ( event) ?;
239239
240- let ( filtered_tests, filtered_benchs) : ( Vec < _ > , _ ) =
241- filtered_tests. into_iter ( ) . partition ( |e| match e. testfn {
242- StaticTestFn ( _) | DynTestFn ( _) => true ,
243- _ => false ,
244- } ) ;
240+ let ( filtered_tests, filtered_benchs) : ( Vec < _ > , _ ) = filtered_tests
241+ . into_iter ( )
242+ . partition ( |e| matches ! ( e. testfn, StaticTestFn ( _) | DynTestFn ( _) ) ) ;
245243
246244 let concurrency = opts. test_threads . unwrap_or_else ( get_concurrency) ;
247245
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ impl Stats for [f64] {
199199 let mut v: f64 = 0.0 ;
200200 for s in self {
201201 let x = * s - mean;
202- v = v + x * x;
202+ v += x * x;
203203 }
204204 // N.B., this is _supposed to be_ len-1, not len. If you
205205 // change it back to len, you will be calculating a
You can’t perform that action at this time.
0 commit comments