Skip to content

Commit

Permalink
cargo fmt 1.75
Browse files Browse the repository at this point in the history
  • Loading branch information
raventid committed Feb 9, 2024
1 parent 87cae07 commit 5fc9619
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/transaction_reader/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion src/utils/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ pub fn parse_arg(arg: &str, kind: &ethabi::ParamType) -> anyhow::Result<Token> {
}
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");
}
Expand Down
4 changes: 3 additions & 1 deletion src/utils/ft_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> anyhow::Result<FungibleTokenMetadata> {
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<String, serde_json::Value> = serde_json::from_str(&input)?;

Ok(FungibleTokenMetadata {
Expand Down

0 comments on commit 5fc9619

Please sign in to comment.