Skip to content

Commit c15f89c

Browse files
authored
Fix violations of elided_named_lifetimes (#3449)
rust-lang/rust#129207 helps name certain elided lifetimes
1 parent fb4adda commit c15f89c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

gossip/src/cluster_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ impl ClusterInfo {
774774
&'a self,
775775
label: &'static str,
776776
counter: &'a Counter,
777-
) -> TimedGuard<'a, RwLockReadGuard<Crds>> {
777+
) -> TimedGuard<'a, RwLockReadGuard<'a, Crds>> {
778778
TimedGuard::new(self.gossip.crds.read().unwrap(), label, counter)
779779
}
780780

gossip/src/push_active_set.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl PushActiveSet {
3434
// If true forces gossip push even if the node has pruned the origin.
3535
should_force_push: impl FnMut(&Pubkey) -> bool + 'a,
3636
stakes: &HashMap<Pubkey, u64>,
37-
) -> impl Iterator<Item = &Pubkey> + 'a {
37+
) -> impl Iterator<Item = &'a Pubkey> + 'a {
3838
let stake = stakes.get(pubkey).min(stakes.get(origin));
3939
self.get_entry(stake)
4040
.get_nodes(pubkey, origin, should_force_push)
@@ -115,7 +115,7 @@ impl PushActiveSetEntry {
115115
origin: &'a Pubkey, // CRDS value owner.
116116
// If true forces gossip push even if the node has pruned the origin.
117117
mut should_force_push: impl FnMut(&Pubkey) -> bool + 'a,
118-
) -> impl Iterator<Item = &Pubkey> + 'a {
118+
) -> impl Iterator<Item = &'a Pubkey> + 'a {
119119
let pubkey_eq_origin = pubkey == origin;
120120
self.0
121121
.iter()

ledger/ledger.lock

Whitespace-only changes.

ledger/src/blockstore.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl Blockstore {
541541
&'a self,
542542
erasure_set: ErasureSetId,
543543
erasure_metas: &'a BTreeMap<ErasureSetId, WorkingEntry<ErasureMeta>>,
544-
) -> Result<Option<(ErasureSetId, Cow<ErasureMeta>)>> {
544+
) -> Result<Option<(ErasureSetId, Cow<'a, ErasureMeta>)>> {
545545
let (slot, fec_set_index) = erasure_set.store_key();
546546

547547
// Check the previous entry from the in memory map to see if it is the consecutive
@@ -1534,7 +1534,7 @@ impl Blockstore {
15341534
slot: Slot,
15351535
erasure_meta: &ErasureMeta,
15361536
just_received_shreds: &'a HashMap<ShredId, Shred>,
1537-
) -> Option<Cow<Vec<u8>>> {
1537+
) -> Option<Cow<'a, Vec<u8>>> {
15381538
// Search for the shred which set the initial erasure config, either inserted,
15391539
// or in the current batch in just_received_shreds.
15401540
let index = erasure_meta.first_received_coding_shred_index()?;

runtime/src/bank.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3518,7 +3518,7 @@ impl Bank {
35183518
pub fn prepare_unlocked_batch_from_single_tx<'a, Tx: SVMMessage>(
35193519
&'a self,
35203520
transaction: &'a RuntimeTransaction<Tx>,
3521-
) -> TransactionBatch<'_, '_, Tx> {
3521+
) -> TransactionBatch<'a, 'a, Tx> {
35223522
let tx_account_lock_limit = self.get_transaction_account_lock_limit();
35233523
let lock_result = validate_account_locks(transaction.account_keys(), tx_account_lock_limit);
35243524
let mut batch = TransactionBatch::new(

svm/examples/json-rpc/server/src/rpc_process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl JsonRpcRequestProcessor {
380380
fn prepare_unlocked_batch_from_single_tx<'a>(
381381
&'a self,
382382
transaction: &'a SanitizedTransaction,
383-
) -> TransactionBatch<'_> {
383+
) -> TransactionBatch<'a> {
384384
let tx_account_lock_limit = solana_sdk::transaction::MAX_TX_ACCOUNT_LOCKS;
385385
let lock_result = transaction
386386
.get_account_locks(tx_account_lock_limit)

0 commit comments

Comments
 (0)