From 773f27e296da6d82dc0104cf135d44663f111f88 Mon Sep 17 00:00:00 2001 From: AlexK Date: Mon, 7 Mar 2022 13:09:59 +0400 Subject: [PATCH] fmt --- ethers-solc/src/artifacts/mod.rs | 12 ++++++++++-- ethers-solc/src/utils.rs | 4 +++- ethers-solc/tests/project.rs | 1 - 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ethers-solc/src/artifacts/mod.rs b/ethers-solc/src/artifacts/mod.rs index f332a6cb..142b5a69 100644 --- a/ethers-solc/src/artifacts/mod.rs +++ b/ethers-solc/src/artifacts/mod.rs @@ -69,10 +69,18 @@ impl CompilerInput { } let mut res = Vec::new(); if !solidity_sources.is_empty() { - res.push(Self { language: "Solidity".to_string(), sources: solidity_sources, settings: Default::default() }); + res.push(Self { + language: "Solidity".to_string(), + sources: solidity_sources, + settings: Default::default(), + }); } if !yul_sources.is_empty() { - res.push(Self { language: "Yul".to_string(), sources: yul_sources, settings: Default::default() }); + res.push(Self { + language: "Yul".to_string(), + sources: yul_sources, + settings: Default::default(), + }); } res } diff --git a/ethers-solc/src/utils.rs b/ethers-solc/src/utils.rs index b8e7f714..b269d52f 100644 --- a/ethers-solc/src/utils.rs +++ b/ethers-solc/src/utils.rs @@ -67,7 +67,9 @@ pub fn source_files(root: impl AsRef) -> Vec { .into_iter() .filter_map(Result::ok) .filter(|e| e.file_type().is_file()) - .filter(|e| e.path().extension().map(|ext| (ext == "sol") || (ext == "yul")).unwrap_or_default()) + .filter(|e| { + e.path().extension().map(|ext| (ext == "sol") || (ext == "yul")).unwrap_or_default() + }) .map(|e| e.path().into()) .collect() } diff --git a/ethers-solc/tests/project.rs b/ethers-solc/tests/project.rs index cf8e12c5..9097844c 100644 --- a/ethers-solc/tests/project.rs +++ b/ethers-solc/tests/project.rs @@ -119,7 +119,6 @@ fn can_compile_yul_sample() { assert_eq!(cache, updated_cache); } - #[test] fn can_compile_configured() { let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test-data/dapp-sample");