Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MexicanAce committed Sep 18, 2023
1 parent 44d541e commit 1277eef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/hardhat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/logging_middleware.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -86,8 +86,8 @@ impl Middleware<Meta> for LoggingMiddleware {
};

Either::Left(Box::pin(next(request, meta).map(move |res| {
log::trace!("API response => {:?}", res);
res
})))
log::trace!("API response => {:?}", res);
res
})))
}
}
5 changes: 2 additions & 3 deletions src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -381,7 +380,7 @@ pub fn apply_tx<T: ForkSource + std::fmt::Debug>(node: &InMemoryNode<T>, 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
}
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 1277eef

Please sign in to comment.