From dbce57d53b4faa93650001138542d227899cf3cc Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Wed, 21 Dec 2022 15:24:44 -0600 Subject: [PATCH] use cache's exisiting id to see if it's dirty --- ethers-solc/src/cache.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ethers-solc/src/cache.rs b/ethers-solc/src/cache.rs index e9bcc6e3..03e52a99 100644 --- a/ethers-solc/src/cache.rs +++ b/ethers-solc/src/cache.rs @@ -789,10 +789,8 @@ impl<'a, T: ArtifactOutput> ArtifactsCacheInner<'a, T> { tracing::trace!("changed content hash for source file \"{}\"", file.display()); return true } - if let Some(compilation_unit) = self - .cache - .compilation_units - .get(&CompilationUnitId::new(version.clone(), self.project.solc_config.clone())) + if let Some(compilation_unit) = + self.cache.compilation_units.get(&entry.compilation_unit) { if self.project.solc_config != compilation_unit.solc_config { tracing::trace!(