Skip to content

Commit 26b11e1

Browse files
committed
fix: resolve clippy warnings after reth v2.0.0 upgrade
Add missing const fn annotations and remove useless .into() conversion.
1 parent 1589a63 commit 26b11e1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

crates/ev-revm/src/evm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<CTX, INSP, P> EvEvm<CTX, INSP, P> {
117117
}
118118

119119
/// Exposes a mutable reference to the wrapped `Evm`.
120-
pub(crate) fn inner_mut(
120+
pub(crate) const fn inner_mut(
121121
&mut self,
122122
) -> &mut Evm<CTX, INSP, EthInstructions<EthInterpreter, CTX>, P, EthFrame<EthInterpreter>>
123123
{

crates/ev-revm/src/tx_env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl EvTxEnv {
6565
}
6666

6767
/// Returns the underlying `TxEnv` mutably.
68-
pub fn inner_mut(&mut self) -> &mut TxEnv {
68+
pub const fn inner_mut(&mut self) -> &mut TxEnv {
6969
&mut self.inner
7070
}
7171

crates/node/src/attributes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,17 @@ impl EvolveEnginePayloadBuilderAttributes {
116116
}
117117

118118
/// Returns the parent block hash.
119-
pub fn parent(&self) -> B256 {
119+
pub const fn parent(&self) -> B256 {
120120
self.parent
121121
}
122122

123123
/// Returns the suggested fee recipient.
124-
pub fn suggested_fee_recipient(&self) -> Address {
124+
pub const fn suggested_fee_recipient(&self) -> Address {
125125
self.inner.suggested_fee_recipient
126126
}
127127

128128
/// Returns the prev randao value.
129-
pub fn prev_randao(&self) -> B256 {
129+
pub const fn prev_randao(&self) -> B256 {
130130
self.inner.prev_randao
131131
}
132132
}

crates/node/src/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ where
372372
withdrawals: payload
373373
.payload
374374
.withdrawals()
375-
.map(|w| std::borrow::Cow::Owned(w.clone().into())),
375+
.map(|w| std::borrow::Cow::Owned(w.clone())),
376376
extra_data: payload.payload.as_v1().extra_data.clone(),
377377
})
378378
}

0 commit comments

Comments
 (0)