File tree 4 files changed +5
-7
lines changed
4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -836,7 +836,7 @@ pub fn check_deadline_state_invariants<BS: Blockstore>(
836
836
) ;
837
837
838
838
summary. expiration_epochs . iter ( ) . for_each ( |& epoch| {
839
- partitions_with_expirations. entry ( epoch) . or_insert ( Vec :: new ( ) ) . push ( index) ;
839
+ partitions_with_expirations. entry ( epoch) . or_default ( ) . push ( index) ;
840
840
} ) ;
841
841
842
842
if summary. early_termination_count > 0 {
Original file line number Diff line number Diff line change @@ -238,8 +238,8 @@ impl State {
238
238
pub ( super ) fn update_smoothed_estimate ( & mut self , delta : ChainEpoch ) {
239
239
let filter_qa_power = AlphaBetaFilter :: load (
240
240
& self . this_epoch_qa_power_smoothed ,
241
- & * DEFAULT_ALPHA ,
242
- & * DEFAULT_BETA ,
241
+ & DEFAULT_ALPHA ,
242
+ & DEFAULT_BETA ,
243
243
) ;
244
244
self . this_epoch_qa_power_smoothed =
245
245
filter_qa_power. next_estimate ( & self . this_epoch_quality_adj_power , delta) ;
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ fn check_cron_invariants<BS: Blockstore>(
126
126
) ;
127
127
events
128
128
. for_each ( |_, event| {
129
- cron_events_by_address. entry ( event. miner_addr ) . or_insert ( Vec :: new ( ) ) . push (
129
+ cron_events_by_address. entry ( event. miner_addr ) . or_default ( ) . push (
130
130
MinerCronEvent { epoch, payload : event. callback_payload . clone ( ) } ,
131
131
) ;
132
132
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -392,9 +392,7 @@ impl<'bs> VM<'bs> {
392
392
393
393
pub fn get_state < C : Cbor > ( & self , addr : Address ) -> Option < C > {
394
394
let a_opt = self . get_actor ( addr) ;
395
- if a_opt == None {
396
- return None ;
397
- } ;
395
+ a_opt. as_ref ( ) ?;
398
396
let a = a_opt. unwrap ( ) ;
399
397
self . store . get_cbor :: < C > ( & a. head ) . unwrap ( )
400
398
}
You can’t perform that action at this time.
0 commit comments