diff --git a/src/hardhat.rs b/src/hardhat.rs index b63681be..52063870 100644 --- a/src/hardhat.rs +++ b/src/hardhat.rs @@ -239,7 +239,7 @@ mod tests { .hardhat_mine(None, None) .await .expect("hardhat_mine"); - assert_eq!(result, true); + assert!(result); let current_block = node .get_block_by_number(zksync_types::api::BlockNumber::Latest, false) @@ -253,7 +253,7 @@ mod tests { .hardhat_mine(None, None) .await .expect("hardhat_mine"); - assert_eq!(result, true); + assert!(result); let current_block = node .get_block_by_number(zksync_types::api::BlockNumber::Latest, false) @@ -284,7 +284,7 @@ mod tests { .hardhat_mine(Some(U64::from(num_blocks)), Some(U64::from(interval))) .await .expect("hardhat_mine"); - assert_eq!(result, true); + assert!(result); for i in 0..num_blocks { let current_block = node diff --git a/src/logging_middleware.rs b/src/logging_middleware.rs index a33f357b..b91f6122 100644 --- a/src/logging_middleware.rs +++ b/src/logging_middleware.rs @@ -1,6 +1,6 @@ use colored::Colorize; -use futures::{future::Either, FutureExt}; use futures::Future; +use futures::{future::Either, FutureExt}; use itertools::Itertools; use jsonrpc_core::{ middleware, Call, FutureResponse, Metadata, Middleware, Params, Request, Response, @@ -86,8 +86,8 @@ impl Middleware for LoggingMiddleware { }; Either::Left(Box::pin(next(request, meta).map(move |res| { - log::trace!("API response => {:?}", res); - res - }))) + log::trace!("API response => {:?}", res); + res + }))) } } diff --git a/src/testing.rs b/src/testing.rs index 24f6dc8c..7fd03227 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -124,7 +124,6 @@ impl MockServer { "sealFields": [], "uncles": [], "transactions": (0..block_config.transaction_count) - .into_iter() .map(|index| { TransactionResponseBuilder::new() .set_hash(H256::repeat_byte(index)) @@ -381,7 +380,7 @@ pub fn apply_tx(node: &InMemoryNode, tx_hash ) .unwrap(); tx.set_input(vec![], tx_hash); - node.apply_txs(vec![tx.into()]).expect("failed applying tx"); + node.apply_txs(vec![tx]).expect("failed applying tx"); produced_block_hash } @@ -463,7 +462,7 @@ mod test { .as_object() .and_then(|o| o.get("result").unwrap().as_array()) .map(|o| { - o.into_iter() + o.iter() .map(|o| o.get("common_data").unwrap().as_object().unwrap()) .map(|o| o.get("L1").unwrap().as_object().unwrap()) .map(|entry| entry.get("serialId").unwrap().as_u64().unwrap())