Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Mar 7, 2024
1 parent b797a39 commit 0ac977d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions crates/providers/src/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ pub trait Provider<N: Network, T: Transport + Clone = BoxTransport>: Send + Sync
self.client().prepare("eth_getBlockByNumber", (number, hydrate)).await
}

// todo eip-1559 and blobs as well
async fn populate_gas(
&self,
tx: &mut N::TransactionRequest,
block: Option<BlockId>,
) -> TransportResult<()> {
let gas = self.estimate_gas(&*tx, block).await;
let _ = self.estimate_gas(&*tx, block).await;

todo!()
// gas.map(|gas| tx.set_gas_limit(gas.try_into().unwrap()))
Expand Down Expand Up @@ -467,9 +468,8 @@ impl<N: Network, T: Transport + Clone> Provider<N, T> for RootProviderInner<N, T

#[cfg(test)]
mod tests {
use crate::HttpProvider;

use super::*;
use crate::HttpProvider;
use alloy_network::Ethereum;
use alloy_node_bindings::{Anvil, AnvilInstance};
use alloy_primitives::{address, b256, bytes};
Expand Down Expand Up @@ -642,10 +642,7 @@ mod tests {
let addr = alloy_primitives::Address::with_last_byte(16);
provider.set_code(addr, "0xbeef").await.unwrap();
let _code = provider
.get_code_at(
addr,
crate::provider::BlockId::Number(alloy_rpc_types::BlockNumberOrTag::Latest),
)
.get_code_at(addr, BlockId::Number(alloy_rpc_types::BlockNumberOrTag::Latest))
.await
.unwrap();
}
Expand Down
6 changes: 3 additions & 3 deletions crates/signer-trezor/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ pub enum TrezorError {
Features,
}

impl Into<alloy_signer::Error> for TrezorError {
fn into(self) -> alloy_signer::Error {
alloy_signer::Error::other(self)
impl From<TrezorError> for alloy_signer::Error {
fn from(error: TrezorError) -> Self {
alloy_signer::Error::other(error)
}
}

0 comments on commit 0ac977d

Please sign in to comment.