fix: remove redundant cache read (#627)

This commit is contained in:
Georgios Konstantopoulos 2021-11-26 19:02:18 +02:00 committed by GitHub
parent d77068e26a
commit e1476a1156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 9 deletions

View File

@ -219,15 +219,7 @@ impl<Artifacts: ArtifactOutput> Project<Artifacts> {
// once matched, proceed to compile with it // once matched, proceed to compile with it
compiled.extend(self.compile_with_version(&solc, sources)?); compiled.extend(self.compile_with_version(&solc, sources)?);
} }
if !compiled.has_compiled_contracts() &&
!compiled.has_compiler_errors() &&
self.cached &&
self.paths.cache.exists()
{
let cache = SolFilesCache::read(&self.paths.cache)?;
let artifacts = cache.read_artifacts::<Artifacts>(&self.paths.artifacts)?;
compiled.artifacts.extend(artifacts);
}
Ok(compiled) Ok(compiled)
} }