File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ impl WorkCounterBase {
38
38
fn merge_inplace ( & mut self , other : & Self ) {
39
39
self . min = self . min . min ( other. min ) ;
40
40
self . max = self . max . max ( other. max ) ;
41
- self . total = self . total + other. total ;
41
+ self . total += other. total ;
42
42
}
43
43
44
44
fn merge_val ( & mut self , val : f64 ) {
45
45
self . min = self . min . min ( val) ;
46
46
self . max = self . max . max ( val) ;
47
- self . total = self . total + val;
47
+ self . total += val;
48
48
}
49
49
}
50
50
@@ -197,7 +197,7 @@ impl SchedulerStat {
197
197
let vs = self
198
198
. work_counters
199
199
. entry ( * id)
200
- . or_insert ( vec ! [ vec![ ] ; counters. len( ) ] ) ;
200
+ . or_insert_with ( || vec ! [ vec![ ] ; counters. len( ) ] ) ;
201
201
for ( v, c) in vs. iter_mut ( ) . zip ( counters. iter ( ) ) {
202
202
v. push ( c. clone ( ) ) ;
203
203
}
@@ -254,7 +254,7 @@ impl WorkerLocalStat {
254
254
} ;
255
255
self . work_counters
256
256
. entry ( work_id)
257
- . or_insert ( WorkerLocalStat :: counter_set ( ) )
257
+ . or_insert_with ( WorkerLocalStat :: counter_set)
258
258
. iter_mut ( )
259
259
. for_each ( |c| c. start ( ) ) ;
260
260
stat
You can’t perform that action at this time.
0 commit comments