File tree 5 files changed +8
-10
lines changed
5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ where
159
159
return summ5;
160
160
}
161
161
162
- total_run = total_run + loop_run;
162
+ total_run += loop_run;
163
163
// Longest we ever run for is 3s.
164
164
if total_run > Duration :: from_secs ( 3 ) {
165
165
return summ5;
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl<T: Write> PrettyFormatter<T> {
139
139
stdouts. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
140
140
let output = String :: from_utf8_lossy ( stdout) ;
141
141
stdouts. push_str ( & output) ;
142
- stdouts. push_str ( " \n " ) ;
142
+ stdouts. push ( '\n' ) ;
143
143
}
144
144
}
145
145
if !stdouts. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ impl<T: Write> TerseFormatter<T> {
114
114
stdouts. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
115
115
let output = String :: from_utf8_lossy ( stdout) ;
116
116
stdouts. push_str ( & output) ;
117
- stdouts. push_str ( " \n " ) ;
117
+ stdouts. push ( '\n' ) ;
118
118
}
119
119
}
120
120
if !stdouts. is_empty ( ) {
@@ -140,7 +140,7 @@ impl<T: Write> TerseFormatter<T> {
140
140
fail_out. push_str ( & format ! ( "---- {} stdout ----\n " , f. name) ) ;
141
141
let output = String :: from_utf8_lossy ( stdout) ;
142
142
fail_out. push_str ( & output) ;
143
- fail_out. push_str ( " \n " ) ;
143
+ fail_out. push ( '\n' ) ;
144
144
}
145
145
}
146
146
if !fail_out. is_empty ( ) {
Original file line number Diff line number Diff line change @@ -237,11 +237,9 @@ where
237
237
let event = TestEvent :: TeFiltered ( filtered_descs) ;
238
238
notify_about_test_event ( event) ?;
239
239
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 ( _) ) ) ;
245
243
246
244
let concurrency = opts. test_threads . unwrap_or_else ( get_concurrency) ;
247
245
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ impl Stats for [f64] {
199
199
let mut v: f64 = 0.0 ;
200
200
for s in self {
201
201
let x = * s - mean;
202
- v = v + x * x;
202
+ v += x * x;
203
203
}
204
204
// N.B., this is _supposed to be_ len-1, not len. If you
205
205
// change it back to len, you will be calculating a
You can’t perform that action at this time.
0 commit comments