chore: fix all warnings (#890)

This commit is contained in:
Matthias Seitz 2022-02-10 07:54:39 +01:00 committed by GitHub
parent c82597c908
commit cc5c67ed0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 11 deletions

View File

@ -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]
@ -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 {

View File

@ -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,

View File

@ -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(())
}

View File

@ -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::*;
@ -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::*;

View File

@ -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));
}