mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
chore: clippy fixes (#1558)
This commit is contained in:
@@ -183,7 +183,7 @@ impl RpcServerArgs {
|
||||
config = config
|
||||
.with_http_address(socket_address)
|
||||
.with_http(ServerBuilder::new())
|
||||
.with_cors(self.http_corsdomain.clone().unwrap_or("".to_string()));
|
||||
.with_cors(self.http_corsdomain.clone().unwrap_or_default());
|
||||
}
|
||||
|
||||
if self.ws {
|
||||
|
||||
@@ -190,7 +190,7 @@ fn ui<B: Backend, T: Table>(f: &mut Frame<'_, B>, app: &mut DbListTUI<T>) {
|
||||
serde_json::to_string_pretty(
|
||||
&app.entries.values().collect::<Vec<_>>()[app.state.selected().unwrap_or(0)],
|
||||
)
|
||||
.unwrap_or(String::from("Error serializing value!")),
|
||||
.unwrap_or_else(|_| String::from("Error serializing value!")),
|
||||
)
|
||||
.block(Block::default().borders(Borders::ALL).title("Value (JSON)"))
|
||||
.wrap(Wrap { trim: false })
|
||||
|
||||
@@ -49,11 +49,9 @@ where
|
||||
let block_hash = self
|
||||
.client()
|
||||
.block_hash_for_id(block_id)?
|
||||
.ok_or_else(|| EthApiError::UnknownBlockNumber)?;
|
||||
let total_difficulty = self
|
||||
.client()
|
||||
.header_td(&block_hash)?
|
||||
.ok_or_else(|| EthApiError::UnknownBlockNumber)?;
|
||||
.ok_or(EthApiError::UnknownBlockNumber)?;
|
||||
let total_difficulty =
|
||||
self.client().header_td(&block_hash)?.ok_or(EthApiError::UnknownBlockNumber)?;
|
||||
let block = Block::from_block(block, total_difficulty, full.into(), Some(block_hash))?;
|
||||
Ok(Some(block.into()))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user