diff --git a/ethers-signers/src/wallet/private_key.rs b/ethers-signers/src/wallet/private_key.rs index 4998fd9c..8a7cd3c2 100644 --- a/ethers-signers/src/wallet/private_key.rs +++ b/ethers-signers/src/wallet/private_key.rs @@ -144,8 +144,8 @@ impl FromStr for Wallet { #[cfg(not(target_arch = "wasm32"))] mod tests { use super::*; - use crate::{Signer, TypedTransaction}; - use ethers_core::types::{Address, U64}; + use crate::Signer; + use ethers_core::types::Address; use tempfile::tempdir; #[tokio::test] @@ -194,7 +194,8 @@ mod tests { #[tokio::test] #[cfg(not(feature = "celo"))] async fn signs_tx() { - use ethers_core::types::TransactionRequest; + use crate::TypedTransaction; + use ethers_core::types::{TransactionRequest, U64}; // retrieved test vector from: // https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction let tx: TypedTransaction = TransactionRequest { diff --git a/ethers-solc/src/cache.rs b/ethers-solc/src/cache.rs index c894b517..4ebdf020 100644 --- a/ethers-solc/src/cache.rs +++ b/ethers-solc/src/cache.rs @@ -727,6 +727,9 @@ impl<'a, T: ArtifactOutput> ArtifactsCache<'a, T> { } #[cfg(test)] + #[allow(unused)] + #[doc(hidden)] + // only useful for debugging for debugging purposes pub fn as_cached(&self) -> Option<&ArtifactsCacheInner<'a, T>> { match self { ArtifactsCache::Ephemeral(_, _) => None, diff --git a/ethers-solc/src/compile/mod.rs b/ethers-solc/src/compile/mod.rs index 28d59742..297c8139 100644 --- a/ethers-solc/src/compile/mod.rs +++ b/ethers-solc/src/compile/mod.rs @@ -1,7 +1,7 @@ use crate::{ artifacts::Source, error::{Result, SolcError}, - report, utils, CompilerInput, CompilerOutput, + utils, CompilerInput, CompilerOutput, }; use semver::{Version, VersionReq}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; @@ -423,9 +423,9 @@ impl Solc { #[cfg(feature = "svm")] pub async fn install(version: &Version) -> std::result::Result<(), svm::SolcVmError> { tracing::trace!("installing solc version \"{}\"", version); - report::solc_installation_start(version); + crate::report::solc_installation_start(version); let result = svm::install(version).await; - report::solc_installation_success(version); + crate::report::solc_installation_success(version); result } @@ -433,9 +433,9 @@ impl Solc { #[cfg(all(feature = "svm", feature = "async"))] pub fn blocking_install(version: &Version) -> std::result::Result<(), svm::SolcVmError> { tracing::trace!("blocking installing solc version \"{}\"", version); - report::solc_installation_start(version); + crate::report::solc_installation_start(version); tokio::runtime::Runtime::new().unwrap().block_on(svm::install(version))?; - report::solc_installation_success(version); + crate::report::solc_installation_success(version); Ok(()) } diff --git a/ethers-solc/src/lib.rs b/ethers-solc/src/lib.rs index 3db5ce9b..c230ac06 100644 --- a/ethers-solc/src/lib.rs +++ b/ethers-solc/src/lib.rs @@ -571,11 +571,11 @@ impl ArtifactOutput for Project { } #[cfg(test)] +#[cfg(all(feature = "svm", feature = "async"))] mod tests { use crate::remappings::Remapping; #[test] - #[cfg(all(feature = "svm", feature = "async"))] fn test_build_all_versions() { use super::*; @@ -593,7 +593,6 @@ mod tests { } #[test] - #[cfg(all(feature = "svm", feature = "async"))] fn test_build_many_libs() { use super::*; @@ -625,7 +624,6 @@ mod tests { } #[test] - #[cfg(all(feature = "svm", feature = "async"))] fn test_build_remappings() { use super::*; diff --git a/ethers-solc/src/report.rs b/ethers-solc/src/report.rs index 49dece9f..22440a76 100644 --- a/ethers-solc/src/report.rs +++ b/ethers-solc/src/report.rs @@ -75,10 +75,12 @@ pub(crate) fn solc_success(solc: &Solc, version: &Version, output: &CompilerOutp with_global(|r| r.reporter.on_solc_success(solc, version, output)); } +#[allow(unused)] pub(crate) fn solc_installation_start(version: &Version) { with_global(|r| r.reporter.on_solc_installation_start(version)); } +#[allow(unused)] pub(crate) fn solc_installation_success(version: &Version) { with_global(|r| r.reporter.on_solc_installation_success(version)); }