diff --git a/ethers-solc/src/compile/mod.rs b/ethers-solc/src/compile/mod.rs index 11fd3ad0..9841fcc6 100644 --- a/ethers-solc/src/compile/mod.rs +++ b/ethers-solc/src/compile/mod.rs @@ -79,7 +79,8 @@ pub static RELEASES: once_cell::sync::Lazy<(svm::Releases, Vec, bool)> /// A `Solc` version is either installed (available locally) or can be downloaded, from the remote /// endpoint -#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] +#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +#[serde(untagged)] pub enum SolcVersion { Installed(Version), Remote(Version), diff --git a/ethers-solc/src/resolver.rs b/ethers-solc/src/resolver.rs index 1d9a515a..16bfbc34 100644 --- a/ethers-solc/src/resolver.rs +++ b/ethers-solc/src/resolver.rs @@ -476,7 +476,7 @@ impl Graph { } let mut result = sets.pop().cloned().expect("not empty; qed.").clone(); - if sets.len() > 1 { + if !sets.is_empty() { result.retain(|item| sets.iter().all(|set| set.contains(item))); } diff --git a/ethers-solc/tests/project.rs b/ethers-solc/tests/project.rs index ac8c01f7..c1afeb4f 100644 --- a/ethers-solc/tests/project.rs +++ b/ethers-solc/tests/project.rs @@ -24,7 +24,6 @@ fn init_tracing() { } #[test] -#[ignore] fn can_get_versioned_linkrefs() { let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("test-data/test-versioned-linkrefs"); let paths = ProjectPathsConfig::builder() @@ -37,8 +36,6 @@ fn can_get_versioned_linkrefs() { let compiled = project.compile().unwrap(); assert!(!compiled.has_compiler_errors()); - - // TODO: } #[test]