diff --git a/ethers-providers/src/call_raw.rs b/ethers-providers/src/call_raw.rs index e0b95bad..24e19b76 100644 --- a/ethers-providers/src/call_raw.rs +++ b/ethers-providers/src/call_raw.rs @@ -495,10 +495,10 @@ pub mod spoof { #[cfg(test)] mod tests { use super::*; - use crate::{Http, Middleware, Provider}; + use crate::{Http, Provider}; use ethers_core::{ types::TransactionRequest, - utils::{get_contract_address, keccak256, parse_ether, Anvil, Geth}, + utils::{get_contract_address, keccak256, parse_ether, Geth}, }; use std::convert::TryFrom; @@ -516,7 +516,7 @@ mod tests { } // Tests "roundtrip" serialization of calls: deserialize(serialize(call)) == call - fn test_encode<'a, P>(call: CallBuilder<'a, P>) { + fn test_encode
(call: CallBuilder
) { let input = call.unwrap().input; let ser = utils::serialize(&input).to_string(); let de: CallInputOwned = serde_json::from_str(&ser).unwrap(); diff --git a/ethers-providers/src/pending_escalator.rs b/ethers-providers/src/pending_escalator.rs index b813f986..3dca65fb 100644 --- a/ethers-providers/src/pending_escalator.rs +++ b/ethers-providers/src/pending_escalator.rs @@ -190,7 +190,7 @@ where poll_broadcast_fut!(cx, this, fut); } Sleeping(delay) => { - let _ready = futures_util::ready!(delay.as_mut().poll(cx)); + futures_util::ready!(delay.as_mut().poll(cx)); // if broadcast timer has elapsed and if we have a TX to // broadcast, broadcast it if this.last.elapsed() > *this.broadcast_interval { diff --git a/ethers-providers/src/pending_transaction.rs b/ethers-providers/src/pending_transaction.rs index 65549f20..40fbdc0e 100644 --- a/ethers-providers/src/pending_transaction.rs +++ b/ethers-providers/src/pending_transaction.rs @@ -172,7 +172,7 @@ impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> { match this.state { PendingTxState::InitialDelay(fut) => { - let _ready = futures_util::ready!(fut.as_mut().poll(ctx)); + futures_util::ready!(fut.as_mut().poll(ctx)); tracing::debug!("Starting to poll pending tx {:?}", *this.tx_hash); let fut = Box::pin(this.provider.get_transaction(*this.tx_hash)); rewake_with_new_state!(ctx, this, PendingTxState::GettingTx(fut)); diff --git a/ethers-providers/src/stream.rs b/ethers-providers/src/stream.rs index 44bb39bf..0a0eb812 100644 --- a/ethers-providers/src/stream.rs +++ b/ethers-providers/src/stream.rs @@ -284,9 +284,13 @@ mod tests { let tx = TransactionRequest::new().from(accounts[0]).to(accounts[0]).value(1e18 as u64); let mut sending = futures_util::future::join_all( - std::iter::repeat(tx.clone()).take(num_txs).map(|tx| async { - provider.send_transaction(tx, None).await.unwrap().await.unwrap().unwrap() - }), + std::iter::repeat(tx.clone()) + .take(num_txs) + .enumerate() + .map(|(nonce, tx)| tx.nonce(nonce)) + .map(|tx| async { + provider.send_transaction(tx, None).await.unwrap().await.unwrap().unwrap() + }), ) .fuse();