Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Mar 8, 2022
1 parent ffa2102 commit a80d485
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions cli/src/cmd/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use ansi_term::Colour;
use clap::{AppSettings, Parser};
use ethers::solc::{ArtifactOutput, Project};
use forge::{
decode::decode_console_logs,
executor::{ opts::EvmOpts},
MultiContractRunnerBuilder, TestFilter, TestResult,
decode::decode_console_logs, executor::opts::EvmOpts, MultiContractRunnerBuilder, TestFilter,
TestResult,
};
use foundry_config::{figment::Figment, Config};
use regex::Regex;
Expand Down
6 changes: 3 additions & 3 deletions forge/src/multi_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ impl MultiContractRunnerBuilder {
if let Some(b) = contract.bytecode.expect("No bytecode").object.into_bytes() {
b
} else {
return Ok(());
return Ok(())
};

let abi = contract.abi.expect("We should have an abi by now");
// if its a test, add it to deployable contracts
if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true)
&& abi.functions().any(|func| func.name.starts_with("test"))
if abi.constructor.as_ref().map(|c| c.inputs.is_empty()).unwrap_or(true) &&
abi.functions().any(|func| func.name.starts_with("test"))
{
deployable_contracts
.insert(fname.clone(), (abi.clone(), bytecode, dependencies.to_vec()));
Expand Down
4 changes: 2 additions & 2 deletions forge/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl<'a, DB: DatabaseRef + Send + Sync> ContractRunner<'a, DB> {
labeled_addresses: Default::default(),
},
)]
.into());
.into())
}

// Run all unit tests
Expand Down Expand Up @@ -356,7 +356,7 @@ impl<'a, DB: DatabaseRef + Send + Sync> ContractRunner<'a, DB> {
}
err => {
tracing::error!(?err);
return Err(err.into());
return Err(err.into())
}
},
};
Expand Down

0 comments on commit a80d485

Please sign in to comment.