Skip to content

Commit f3fae7a

Browse files
authored
chore: fix clippy (#3044)
1 parent ec43794 commit f3fae7a

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

crates/consensus/src/crypto.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,9 @@ pub mod backend {
175175

176176
/// Get the currently installed default provider, panicking if none is installed.
177177
pub fn get_default_provider() -> &'static dyn CryptoProvider {
178-
try_get_provider().map_or_else(
179-
|| panic!("No crypto backend installed. Call install_default_provider() first."),
180-
|provider| provider,
181-
)
178+
try_get_provider().unwrap_or_else(|| {
179+
panic!("No crypto backend installed. Call install_default_provider() first.")
180+
})
182181
}
183182

184183
/// Try to get the currently installed default provider, returning None if none is installed.

crates/rpc-types-mev/src/mev_calls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub struct SimBundleLogs {
283283
pub tx_logs: Option<Vec<Log>>,
284284
/// Logs for bundles in bundle.
285285
#[serde(default, skip_serializing_if = "Option::is_none")]
286-
pub bundle_logs: Option<Vec<SimBundleLogs>>,
286+
pub bundle_logs: Option<Vec<Self>>,
287287
}
288288

289289
#[cfg(test)]

crates/rpc-types-trace/src/geth/call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub struct CallFrame {
3333
pub revert_reason: Option<String>,
3434
/// Recorded child calls.
3535
#[serde(default, skip_serializing_if = "Vec::is_empty")]
36-
pub calls: Vec<CallFrame>,
36+
pub calls: Vec<Self>,
3737
/// Logs emitted by this call.
3838
#[serde(default, skip_serializing_if = "Vec::is_empty")]
3939
pub logs: Vec<CallLogFrame>,

crates/rpc-types-trace/src/geth/erc7562.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub struct Erc7562Frame {
5858
pub keccak: Vec<Bytes>,
5959
/// The call frames.
6060
#[serde(default, skip_serializing_if = "Vec::is_empty")]
61-
pub calls: Vec<Erc7562Frame>,
61+
pub calls: Vec<Self>,
6262
}
6363

6464
/// The accessed slots.

crates/serde/src/other/arbitrary_.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ enum ArbitraryValue {
1818
Bool(bool),
1919
Number(u64),
2020
String(String),
21-
Array(Vec<ArbitraryValue>),
22-
Object(BTreeMap<String, ArbitraryValue>),
21+
Array(Vec<Self>),
22+
Object(BTreeMap<String, Self>),
2323
}
2424

2525
impl ArbitraryValue {

0 commit comments

Comments
 (0)