Skip to content

Commit f3338ab

Browse files
authored
fix: captured impl trait lifetime (#350)
* fix: captured impl trait lifetime Signed-off-by: Gregory Edison <[email protected]> * fix: remove unused use Signed-off-by: Gregory Edison <[email protected]> * fix: bump alloy-dyn-abi related to advisory Signed-off-by: Gregory Edison <[email protected]> --------- Signed-off-by: Gregory Edison <[email protected]>
1 parent 32019bc commit f3338ab

File tree

10 files changed

+72
-49
lines changed

10 files changed

+72
-49
lines changed

Cargo.lock

Lines changed: 61 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ revm-inspectors = "0.29.0"
502502

503503
# eth
504504
alloy-chains = { version = "0.2.5", default-features = false }
505-
alloy-dyn-abi = "1.3.1"
505+
alloy-dyn-abi = "1.4.1"
506506
alloy-eip2124 = { version = "0.2.0", default-features = false }
507507
alloy-evm = { version = "0.21.2", default-features = false }
508508
alloy-primitives = { version = "1.3.1", default-features = false, features = ["map-foldhash"] }

crates/chain-state/src/in_memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ pub struct BlockState<N: NodePrimitives = EthPrimitives> {
570570
/// The executed block that determines the state after this block has been executed.
571571
block: ExecutedBlockWithTrieUpdates<N>,
572572
/// The block's parent block if it exists.
573-
parent: Option<Arc<BlockState<N>>>,
573+
parent: Option<Arc<Self>>,
574574
}
575575

576576
impl<N: NodePrimitives> BlockState<N> {

crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ where
510510
Box::pin(async move {
511511
let mut accepted_check: bool = false;
512512

513-
let mut latest_block = env
513+
let latest_block = env
514514
.current_block_info()
515515
.ok_or_else(|| eyre::eyre!("No latest block information available"))?;
516516

@@ -603,10 +603,6 @@ where
603603
rpc_latest_header.inner.timestamp;
604604
env.active_node_state_mut()?.latest_fork_choice_state.head_block_hash =
605605
rpc_latest_header.hash;
606-
607-
// update local copy for any further usage in this scope
608-
latest_block.hash = rpc_latest_header.hash;
609-
latest_block.number = rpc_latest_header.inner.number;
610606
}
611607
}
612608

crates/net/discv4/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,7 @@ pub enum DiscoveryUpdate {
24022402
/// Node that was removed from the table
24032403
Removed(PeerId),
24042404
/// A series of updates
2405-
Batch(Vec<DiscoveryUpdate>),
2405+
Batch(Vec<Self>),
24062406
}
24072407

24082408
#[cfg(test)]

crates/net/network/src/transactions/fetcher.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,7 @@ impl<N: NetworkPrimitives> TransactionFetcher<N> {
284284

285285
// folds size based on expected response size and adds selected hashes to the request
286286
// list and the other hashes to the surplus list
287-
loop {
288-
let Some((hash, metadata)) = hashes_from_announcement_iter.next() else { break };
289-
287+
for (hash, metadata) in hashes_from_announcement_iter.by_ref() {
290288
let Some((_ty, size)) = metadata else {
291289
unreachable!("this method is called upon reception of an eth68 announcement")
292290
};

crates/node/builder/src/launch/engine.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ impl EngineNodeLauncher {
237237

238238
info!(target: "reth::cli", "Consensus engine initialized");
239239

240+
#[allow(clippy::needless_continue)]
240241
let events = stream_select!(
241242
event_sender.new_listener().map(Into::into),
242243
pipeline_events.map(Into::into),

crates/node/builder/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ where
184184
/// Returns the [`EngineApiClient`] interface for the authenticated engine API.
185185
///
186186
/// This will send authenticated http requests to the node's auth server.
187-
pub fn engine_http_client(&self) -> impl EngineApiClient<Engine> {
187+
pub fn engine_http_client(&self) -> impl EngineApiClient<Engine> + use<Engine, Node, AddOns> {
188188
self.auth_server_handle().http_client()
189189
}
190190

crates/rpc/rpc-builder/src/auth.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ impl AuthServerHandle {
354354
/// Returns a http client connected to the server.
355355
///
356356
/// This client uses the JWT token to authenticate requests.
357-
pub fn http_client(&self) -> impl SubscriptionClientT + Clone + Send + Sync + Unpin + 'static {
357+
pub fn http_client(
358+
&self,
359+
) -> impl SubscriptionClientT + use<> + Clone + Send + Sync + Unpin + 'static {
358360
// Create a middleware that adds a new JWT token to every request.
359361
let secret_layer = AuthClientLayer::new(self.secret);
360362
let middleware = tower::ServiceBuilder::default().layer(secret_layer);

crates/transaction-pool/src/test_utils/pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub(crate) enum Scenario {
188188
HigherNonce { onchain: u64, nonce: u64 },
189189
Multi {
190190
// Execute multiple test scenarios
191-
scenario: Vec<Scenario>,
191+
scenario: Vec<Self>,
192192
},
193193
}
194194

0 commit comments

Comments
 (0)