Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

chore: fix all warnings #890

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ethers-signers/src/wallet/private_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ impl FromStr for Wallet<SigningKey> {
#[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]
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions ethers-solc/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions ethers-solc/src/compile/mod.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down Expand Up @@ -423,19 +423,19 @@ 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
}

/// Blocking version of `Self::install`
#[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(())
}

Expand Down
4 changes: 1 addition & 3 deletions ethers-solc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,11 @@ impl<Artifacts: ArtifactOutput> ArtifactOutput for Project<Artifacts> {
}

#[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::*;

Expand All @@ -593,7 +593,6 @@ mod tests {
}

#[test]
#[cfg(all(feature = "svm", feature = "async"))]
fn test_build_many_libs() {
use super::*;

Expand Down Expand Up @@ -625,7 +624,6 @@ mod tests {
}

#[test]
#[cfg(all(feature = "svm", feature = "async"))]
fn test_build_remappings() {
use super::*;

Expand Down
2 changes: 2 additions & 0 deletions ethers-solc/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down