From 2a3457e770479898179c6568493ad41cc12a350e Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 23 Oct 2024 15:29:52 -0600 Subject: [PATCH 1/2] update MSRV to 1.82.0 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 624eb0ea6..2e2b8c852 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.76.0" +channel = "1.82.0" From b99754f83e15b4e8f4a2b1a766550908fa9f1a09 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Wed, 23 Oct 2024 15:30:14 -0600 Subject: [PATCH 2/2] clippy fixes --- ethereum-consensus/src/networking.rs | 2 +- ethereum-consensus/src/types/beacon_block.rs | 6 ++---- ethereum-consensus/src/types/beacon_block_body.rs | 6 ++---- ethereum-consensus/src/types/beacon_state.rs | 6 ++---- ethereum-consensus/src/types/blinded_beacon_block.rs | 6 ++---- ethereum-consensus/src/types/blinded_beacon_block_body.rs | 6 ++---- ethereum-consensus/src/types/execution_payload.rs | 6 ++---- ethereum-consensus/src/types/execution_payload_header.rs | 8 ++++---- spec-gen/src/visitors.rs | 2 +- 9 files changed, 18 insertions(+), 30 deletions(-) diff --git a/ethereum-consensus/src/networking.rs b/ethereum-consensus/src/networking.rs index 627f01109..76eb388e6 100644 --- a/ethereum-consensus/src/networking.rs +++ b/ethereum-consensus/src/networking.rs @@ -69,7 +69,7 @@ impl<'de> Deserialize<'de> for PeerId { struct PeerIdVisitor; - impl<'de> Visitor<'de> for PeerIdVisitor { + impl Visitor<'_> for PeerIdVisitor { type Value = PeerId; fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result { diff --git a/ethereum-consensus/src/types/beacon_block.rs b/ethereum-consensus/src/types/beacon_block.rs index 5fb9b1922..849cb6325 100644 --- a/ethereum-consensus/src/types/beacon_block.rs +++ b/ethereum-consensus/src/types/beacon_block.rs @@ -629,7 +629,6 @@ pub enum BeaconBlockRef< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -646,7 +645,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BeaconBlockRef< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, @@ -1265,7 +1264,6 @@ pub enum BeaconBlockRefMut< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -1282,7 +1280,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BeaconBlockRefMut< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, diff --git a/ethereum-consensus/src/types/beacon_block_body.rs b/ethereum-consensus/src/types/beacon_block_body.rs index 876faaa67..b81026849 100644 --- a/ethereum-consensus/src/types/beacon_block_body.rs +++ b/ethereum-consensus/src/types/beacon_block_body.rs @@ -763,7 +763,6 @@ pub enum BeaconBlockBodyRef< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -780,7 +779,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BeaconBlockBodyRef< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, @@ -1463,7 +1462,6 @@ pub enum BeaconBlockBodyRefMut< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -1480,7 +1478,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BeaconBlockBodyRefMut< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, diff --git a/ethereum-consensus/src/types/beacon_state.rs b/ethereum-consensus/src/types/beacon_state.rs index 7bc2699a0..f814c948d 100644 --- a/ethereum-consensus/src/types/beacon_state.rs +++ b/ethereum-consensus/src/types/beacon_state.rs @@ -1043,7 +1043,6 @@ pub enum BeaconStateRef< ), } impl< - 'a, const SLOTS_PER_HISTORICAL_ROOT: usize, const HISTORICAL_ROOTS_LIMIT: usize, const ETH1_DATA_VOTES_BOUND: usize, @@ -1057,7 +1056,7 @@ impl< const MAX_EXTRA_DATA_BYTES: usize, > BeaconStateRef< - 'a, + '_, SLOTS_PER_HISTORICAL_ROOT, HISTORICAL_ROOTS_LIMIT, ETH1_DATA_VOTES_BOUND, @@ -1840,7 +1839,6 @@ pub enum BeaconStateRefMut< ), } impl< - 'a, const SLOTS_PER_HISTORICAL_ROOT: usize, const HISTORICAL_ROOTS_LIMIT: usize, const ETH1_DATA_VOTES_BOUND: usize, @@ -1854,7 +1852,7 @@ impl< const MAX_EXTRA_DATA_BYTES: usize, > BeaconStateRefMut< - 'a, + '_, SLOTS_PER_HISTORICAL_ROOT, HISTORICAL_ROOTS_LIMIT, ETH1_DATA_VOTES_BOUND, diff --git a/ethereum-consensus/src/types/blinded_beacon_block.rs b/ethereum-consensus/src/types/blinded_beacon_block.rs index 82271d8e0..b71ebca47 100644 --- a/ethereum-consensus/src/types/blinded_beacon_block.rs +++ b/ethereum-consensus/src/types/blinded_beacon_block.rs @@ -431,7 +431,6 @@ pub enum BlindedBeaconBlockRef< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -445,7 +444,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BlindedBeaconBlockRef< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, @@ -819,7 +818,6 @@ pub enum BlindedBeaconBlockRefMut< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -833,7 +831,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BlindedBeaconBlockRefMut< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, diff --git a/ethereum-consensus/src/types/blinded_beacon_block_body.rs b/ethereum-consensus/src/types/blinded_beacon_block_body.rs index 262c4fe29..a5b038d81 100644 --- a/ethereum-consensus/src/types/blinded_beacon_block_body.rs +++ b/ethereum-consensus/src/types/blinded_beacon_block_body.rs @@ -528,7 +528,6 @@ pub enum BlindedBeaconBlockBodyRef< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -542,7 +541,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BlindedBeaconBlockBodyRef< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, @@ -961,7 +960,6 @@ pub enum BlindedBeaconBlockBodyRefMut< ), } impl< - 'a, const MAX_PROPOSER_SLASHINGS: usize, const MAX_VALIDATORS_PER_COMMITTEE: usize, const MAX_ATTESTER_SLASHINGS: usize, @@ -975,7 +973,7 @@ impl< const MAX_BLOB_COMMITMENTS_PER_BLOCK: usize, > BlindedBeaconBlockBodyRefMut< - 'a, + '_, MAX_PROPOSER_SLASHINGS, MAX_VALIDATORS_PER_COMMITTEE, MAX_ATTESTER_SLASHINGS, diff --git a/ethereum-consensus/src/types/execution_payload.rs b/ethereum-consensus/src/types/execution_payload.rs index 00c3464d3..ba9d9bbaa 100644 --- a/ethereum-consensus/src/types/execution_payload.rs +++ b/ethereum-consensus/src/types/execution_payload.rs @@ -476,7 +476,6 @@ pub enum ExecutionPayloadRef< ), } impl< - 'a, const BYTES_PER_LOGS_BLOOM: usize, const MAX_EXTRA_DATA_BYTES: usize, const MAX_BYTES_PER_TRANSACTION: usize, @@ -484,7 +483,7 @@ impl< const MAX_WITHDRAWALS_PER_PAYLOAD: usize, > ExecutionPayloadRef< - 'a, + '_, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, MAX_BYTES_PER_TRANSACTION, @@ -818,7 +817,6 @@ pub enum ExecutionPayloadRefMut< ), } impl< - 'a, const BYTES_PER_LOGS_BLOOM: usize, const MAX_EXTRA_DATA_BYTES: usize, const MAX_BYTES_PER_TRANSACTION: usize, @@ -826,7 +824,7 @@ impl< const MAX_WITHDRAWALS_PER_PAYLOAD: usize, > ExecutionPayloadRefMut< - 'a, + '_, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES, MAX_BYTES_PER_TRANSACTION, diff --git a/ethereum-consensus/src/types/execution_payload_header.rs b/ethereum-consensus/src/types/execution_payload_header.rs index 15d1efb93..dea669832 100644 --- a/ethereum-consensus/src/types/execution_payload_header.rs +++ b/ethereum-consensus/src/types/execution_payload_header.rs @@ -350,8 +350,8 @@ pub enum ExecutionPayloadHeaderRef< Capella(&'a capella::ExecutionPayloadHeader), Deneb(&'a deneb::ExecutionPayloadHeader), } -impl<'a, const BYTES_PER_LOGS_BLOOM: usize, const MAX_EXTRA_DATA_BYTES: usize> - ExecutionPayloadHeaderRef<'a, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES> +impl + ExecutionPayloadHeaderRef<'_, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES> { pub fn bellatrix( &self, @@ -548,8 +548,8 @@ pub enum ExecutionPayloadHeaderRefMut< Capella(&'a mut capella::ExecutionPayloadHeader), Deneb(&'a mut deneb::ExecutionPayloadHeader), } -impl<'a, const BYTES_PER_LOGS_BLOOM: usize, const MAX_EXTRA_DATA_BYTES: usize> - ExecutionPayloadHeaderRefMut<'a, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES> +impl + ExecutionPayloadHeaderRefMut<'_, BYTES_PER_LOGS_BLOOM, MAX_EXTRA_DATA_BYTES> { pub fn bellatrix( &self, diff --git a/spec-gen/src/visitors.rs b/spec-gen/src/visitors.rs index 214a6fc7a..819beca1e 100644 --- a/spec-gen/src/visitors.rs +++ b/spec-gen/src/visitors.rs @@ -228,7 +228,7 @@ impl<'a> ArgumentsEditor<'a> { } } -impl<'a> VisitMut for ArgumentsEditor<'a> { +impl VisitMut for ArgumentsEditor<'_> { fn visit_angle_bracketed_generic_arguments_mut( &mut self, i: &mut syn::AngleBracketedGenericArguments,