From 5fc96197d0e1f5886ed5730bdeb7f1b761df89f2 Mon Sep 17 00:00:00 2001 From: Julian Kulesh Date: Fri, 9 Feb 2024 20:16:32 +0800 Subject: [PATCH] cargo fmt 1.75 --- src/transaction_reader/filter.rs | 4 +++- src/utils/abi.rs | 4 +++- src/utils/ft_metadata.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/transaction_reader/filter.rs b/src/transaction_reader/filter.rs index 8f3b1c1..629a400 100644 --- a/src/transaction_reader/filter.rs +++ b/src/transaction_reader/filter.rs @@ -81,7 +81,9 @@ pub struct GeneralGasFilter { impl Filter for GeneralGasFilter { fn pass(&self, data: &TxData) -> bool { - let Some(near_gas_used) = data.gas_profile.get("TOTAL") else { return false }; + let Some(near_gas_used) = data.gas_profile.get("TOTAL") else { + return false; + }; let evm_gas_used = match &data.status { TxStatus::Executed(submit_result) => &submit_result.gas_used, _ => return false, diff --git a/src/utils/abi.rs b/src/utils/abi.rs index 3c8c8ff..22bfc0a 100644 --- a/src/utils/abi.rs +++ b/src/utils/abi.rs @@ -85,7 +85,9 @@ pub fn parse_arg(arg: &str, kind: ðabi::ParamType) -> anyhow::Result { } ethabi::ParamType::Tuple(tuple_kinds) => { let value: Value = serde_json::from_str(arg)?; - let Value::Array(values) = value else { anyhow::bail!("Expected Array"); }; + let Value::Array(values) = value else { + anyhow::bail!("Expected Array"); + }; if values.len() != tuple_kinds.len() { anyhow::bail!("Incorrect number of args for tuple size"); } diff --git a/src/utils/ft_metadata.rs b/src/utils/ft_metadata.rs index 00cfe51..73de824 100644 --- a/src/utils/ft_metadata.rs +++ b/src/utils/ft_metadata.rs @@ -2,7 +2,9 @@ use aurora_engine_types::borsh::BorshDeserialize; use aurora_engine_types::parameters::connector::{FungibleReferenceHash, FungibleTokenMetadata}; pub fn parse_ft_metadata(input: Option) -> anyhow::Result { - let Some(input) = input else { return Ok(default_ft_metadata()); }; + let Some(input) = input else { + return Ok(default_ft_metadata()); + }; let json: serde_json::Map = serde_json::from_str(&input)?; Ok(FungibleTokenMetadata {