remove clone (#24244)

This commit is contained in:
Jeff Washington (jwash) 2022-04-11 13:15:00 -05:00 committed by GitHub
parent 60b2155bd3
commit 9ac2245970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -158,7 +158,7 @@ impl SnapshotRequestHandler {
ancestors: None,
use_write_cache: false,
epoch_schedule: snapshot_root_bank.epoch_schedule(),
rent_collector: &snapshot_root_bank.rent_collector(),
rent_collector: snapshot_root_bank.rent_collector(),
},
).unwrap();
assert_eq!(previous_hash, this_hash);

View File

@ -6155,8 +6155,8 @@ impl Bank {
*self.inflation.read().unwrap()
}
pub fn rent_collector(&self) -> RentCollector {
self.rent_collector.clone()
pub fn rent_collector(&self) -> &RentCollector {
&self.rent_collector
}
/// Return the total capitalization of the Bank

View File

@ -112,7 +112,7 @@ impl AccountsPackage {
snapshot_type,
accounts: bank.accounts(),
epoch_schedule: *bank.epoch_schedule(),
rent_collector: bank.rent_collector(),
rent_collector: bank.rent_collector().clone(),
})
}
}