Rust clippy 1.87 lint fixes (#7471)

Fix clippy lints for `rustc` 1.87


  clippy complains about `BeaconChainError` being too large. I went on a bit of a boxing spree because of this. We may instead want to `Box` some of the `BeaconChainError` variants?
This commit is contained in:
Eitan Seri-Levi
2025-05-15 22:03:00 -07:00
committed by GitHub
parent c4182e362b
commit 268809a530
24 changed files with 223 additions and 195 deletions

View File

@@ -319,9 +319,9 @@ pub fn validate_execution_payload_for_gossip<T: BeaconChainTypes>(
.slot_clock
.start_of(block.slot())
.map(|d| d.as_secs())
.ok_or(BlockError::BeaconChainError(
.ok_or(BlockError::BeaconChainError(Box::new(
BeaconChainError::UnableToComputeTimeAtSlot,
))?;
)))?;
// The block's execution payload timestamp is correct with respect to the slot
if execution_payload.timestamp() != expected_timestamp {
@@ -504,7 +504,7 @@ where
"prepare_execution_payload_forkchoice_update_params",
)
.await
.map_err(BlockProductionError::BeaconChain)?;
.map_err(|e| BlockProductionError::BeaconChain(Box::new(e)))?;
let suggested_fee_recipient = execution_layer
.get_suggested_fee_recipient(proposer_index)