Skip to content

Commit

Permalink
clippy: slice
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoranYi committed Aug 19, 2022
1 parent 54dafec commit 9508b23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3199,11 +3199,11 @@ impl Bank {
point_value.rewards as f64 / point_value.points as f64
}

fn store_stake_accounts(&self, stake_rewards: &Vec<StakeReward>, metrics: &mut RewardsMetrics) {
fn store_stake_accounts(&self, stake_rewards: &[StakeReward], metrics: &mut RewardsMetrics) {
// store stake account even if stakers_reward is 0
// because credits observed has changed
let mut m = Measure::start("store_stake_account");
self.store_accounts((self.slot(), &stake_rewards[..]));
self.store_accounts((self.slot(), stake_rewards));
m.stop();
metrics
.store_stake_accounts_us
Expand Down

0 comments on commit 9508b23

Please sign in to comment.