Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix violations of elided_named_lifetimes #3449

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gossip/src/cluster_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ impl ClusterInfo {
&'a self,
label: &'static str,
counter: &'a Counter,
) -> TimedGuard<'a, RwLockReadGuard<Crds>> {
) -> TimedGuard<'a, RwLockReadGuard<'a, Crds>> {
TimedGuard::new(self.gossip.crds.read().unwrap(), label, counter)
}

Expand Down
4 changes: 2 additions & 2 deletions gossip/src/push_active_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl PushActiveSet {
// If true forces gossip push even if the node has pruned the origin.
should_force_push: impl FnMut(&Pubkey) -> bool + 'a,
stakes: &HashMap<Pubkey, u64>,
) -> impl Iterator<Item = &Pubkey> + 'a {
) -> impl Iterator<Item = &'a Pubkey> + 'a {
let stake = stakes.get(pubkey).min(stakes.get(origin));
self.get_entry(stake)
.get_nodes(pubkey, origin, should_force_push)
Expand Down Expand Up @@ -115,7 +115,7 @@ impl PushActiveSetEntry {
origin: &'a Pubkey, // CRDS value owner.
// If true forces gossip push even if the node has pruned the origin.
mut should_force_push: impl FnMut(&Pubkey) -> bool + 'a,
) -> impl Iterator<Item = &Pubkey> + 'a {
) -> impl Iterator<Item = &'a Pubkey> + 'a {
let pubkey_eq_origin = pubkey == origin;
self.0
.iter()
Expand Down
Empty file added ledger/ledger.lock
Empty file.
4 changes: 2 additions & 2 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ impl Blockstore {
&'a self,
erasure_set: ErasureSetId,
erasure_metas: &'a BTreeMap<ErasureSetId, WorkingEntry<ErasureMeta>>,
) -> Result<Option<(ErasureSetId, Cow<ErasureMeta>)>> {
) -> Result<Option<(ErasureSetId, Cow<'a, ErasureMeta>)>> {
let (slot, fec_set_index) = erasure_set.store_key();

// Check the previous entry from the in memory map to see if it is the consecutive
Expand Down Expand Up @@ -1534,7 +1534,7 @@ impl Blockstore {
slot: Slot,
erasure_meta: &ErasureMeta,
just_received_shreds: &'a HashMap<ShredId, Shred>,
) -> Option<Cow<Vec<u8>>> {
) -> Option<Cow<'a, Vec<u8>>> {
// Search for the shred which set the initial erasure config, either inserted,
// or in the current batch in just_received_shreds.
let index = erasure_meta.first_received_coding_shred_index()?;
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3518,7 +3518,7 @@ impl Bank {
pub fn prepare_unlocked_batch_from_single_tx<'a, Tx: SVMMessage>(
&'a self,
transaction: &'a RuntimeTransaction<Tx>,
) -> TransactionBatch<'_, '_, Tx> {
) -> TransactionBatch<'a, 'a, Tx> {
let tx_account_lock_limit = self.get_transaction_account_lock_limit();
let lock_result = validate_account_locks(transaction.account_keys(), tx_account_lock_limit);
let mut batch = TransactionBatch::new(
Expand Down
2 changes: 1 addition & 1 deletion svm/examples/json-rpc/server/src/rpc_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl JsonRpcRequestProcessor {
fn prepare_unlocked_batch_from_single_tx<'a>(
&'a self,
transaction: &'a SanitizedTransaction,
) -> TransactionBatch<'_> {
) -> TransactionBatch<'a> {
let tx_account_lock_limit = solana_sdk::transaction::MAX_TX_ACCOUNT_LOCKS;
let lock_result = transaction
.get_account_locks(tx_account_lock_limit)
Expand Down
Loading