From 2ad3ee8b7566293605d272291b5dd2edd05a207a Mon Sep 17 00:00:00 2001 From: colindickson Date: Mon, 11 Dec 2023 10:35:57 -0500 Subject: [PATCH] rustfmt --- abigen-tests/src/lib.rs | 15 ++++++++++----- core/src/block_view.rs | 2 +- substreams-ethereum/src/lib.rs | 1 - 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/abigen-tests/src/lib.rs b/abigen-tests/src/lib.rs index 220dacd..32514c9 100644 --- a/abigen-tests/src/lib.rs +++ b/abigen-tests/src/lib.rs @@ -12,13 +12,13 @@ mod tests { #[macro_export] macro_rules! assert_bytes { - ($left:expr, $right:expr$(,)?) => ({ + ($left:expr, $right:expr$(,)?) => {{ let (left, right) = (&$left, &$right); if !(*left == *right) { // Delegate to `assert_eq!` for diff assert_eq!(Hex(left).to_string(), Hex(right).to_string()) } - }); + }}; } #[test] @@ -820,7 +820,8 @@ mod tests { use tests::functions::FunInt128 as Function; let call = pb::eth::v2::Call { - input: hex!("5b3357ff0000000000000000000000000000000000000000000000000000000000000000").to_vec(), + input: hex!("5b3357ff0000000000000000000000000000000000000000000000000000000000000000") + .to_vec(), ..Default::default() }; @@ -837,13 +838,17 @@ mod tests { #[test] fn it_encode_fun_fun_int128() { - use tests::functions::FunInt128 as Function; use substreams::scalar::BigInt; + use tests::functions::FunInt128 as Function; let fun = Function { arg0: BigInt::zero(), }; - assert_bytes!(fun.encode(), hex!("5b3357ff0000000000000000000000000000000000000000000000000000000000000000").to_vec()); + assert_bytes!( + fun.encode(), + hex!("5b3357ff0000000000000000000000000000000000000000000000000000000000000000") + .to_vec() + ); } } diff --git a/core/src/block_view.rs b/core/src/block_view.rs index afae6cd..eb2e478 100644 --- a/core/src/block_view.rs +++ b/core/src/block_view.rs @@ -6,7 +6,7 @@ use crate::{pb::eth::v2 as pb, Event}; impl pb::Block { /// Iterates over successful transactions pub fn transactions(&self) -> impl Iterator { - self.transaction_traces.iter().filter(|tx| { tx.status == 1 }) + self.transaction_traces.iter().filter(|tx| tx.status == 1) } /// Iterates over transaction receipts of successful transactions. diff --git a/substreams-ethereum/src/lib.rs b/substreams-ethereum/src/lib.rs index fba8754..ed11fb4 100644 --- a/substreams-ethereum/src/lib.rs +++ b/substreams-ethereum/src/lib.rs @@ -1,4 +1,3 @@ - pub use substreams_ethereum_core::scalar; pub use substreams_ethereum_core::{block_view, pb, rpc, Event, Function, NULL_ADDRESS}; pub use substreams_ethereum_derive::EthabiContract;