fmt
This commit is contained in:
parent
01500f1e36
commit
773f27e296
|
@ -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
|
||||
}
|
||||
|
|
|
@ -67,7 +67,9 @@ pub fn source_files(root: impl AsRef<Path>) -> Vec<PathBuf> {
|
|||
.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()
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue