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!(