chore: fix all warnings (#890)
This commit is contained in:
parent
c82597c908
commit
cc5c67ed0a
|
@ -144,8 +144,8 @@ impl FromStr for Wallet<SigningKey> {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{Signer, TypedTransaction};
|
use crate::Signer;
|
||||||
use ethers_core::types::{Address, U64};
|
use ethers_core::types::Address;
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
@ -194,7 +194,8 @@ mod tests {
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
#[cfg(not(feature = "celo"))]
|
#[cfg(not(feature = "celo"))]
|
||||||
async fn signs_tx() {
|
async fn signs_tx() {
|
||||||
use ethers_core::types::TransactionRequest;
|
use crate::TypedTransaction;
|
||||||
|
use ethers_core::types::{TransactionRequest, U64};
|
||||||
// retrieved test vector from:
|
// retrieved test vector from:
|
||||||
// https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction
|
// https://web3js.readthedocs.io/en/v1.2.0/web3-eth-accounts.html#eth-accounts-signtransaction
|
||||||
let tx: TypedTransaction = TransactionRequest {
|
let tx: TypedTransaction = TransactionRequest {
|
||||||
|
|
|
@ -727,6 +727,9 @@ impl<'a, T: ArtifactOutput> ArtifactsCache<'a, T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
#[allow(unused)]
|
||||||
|
#[doc(hidden)]
|
||||||
|
// only useful for debugging for debugging purposes
|
||||||
pub fn as_cached(&self) -> Option<&ArtifactsCacheInner<'a, T>> {
|
pub fn as_cached(&self) -> Option<&ArtifactsCacheInner<'a, T>> {
|
||||||
match self {
|
match self {
|
||||||
ArtifactsCache::Ephemeral(_, _) => None,
|
ArtifactsCache::Ephemeral(_, _) => None,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
artifacts::Source,
|
artifacts::Source,
|
||||||
error::{Result, SolcError},
|
error::{Result, SolcError},
|
||||||
report, utils, CompilerInput, CompilerOutput,
|
utils, CompilerInput, CompilerOutput,
|
||||||
};
|
};
|
||||||
use semver::{Version, VersionReq};
|
use semver::{Version, VersionReq};
|
||||||
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||||
|
@ -423,9 +423,9 @@ impl Solc {
|
||||||
#[cfg(feature = "svm")]
|
#[cfg(feature = "svm")]
|
||||||
pub async fn install(version: &Version) -> std::result::Result<(), svm::SolcVmError> {
|
pub async fn install(version: &Version) -> std::result::Result<(), svm::SolcVmError> {
|
||||||
tracing::trace!("installing solc version \"{}\"", version);
|
tracing::trace!("installing solc version \"{}\"", version);
|
||||||
report::solc_installation_start(version);
|
crate::report::solc_installation_start(version);
|
||||||
let result = svm::install(version).await;
|
let result = svm::install(version).await;
|
||||||
report::solc_installation_success(version);
|
crate::report::solc_installation_success(version);
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,9 +433,9 @@ impl Solc {
|
||||||
#[cfg(all(feature = "svm", feature = "async"))]
|
#[cfg(all(feature = "svm", feature = "async"))]
|
||||||
pub fn blocking_install(version: &Version) -> std::result::Result<(), svm::SolcVmError> {
|
pub fn blocking_install(version: &Version) -> std::result::Result<(), svm::SolcVmError> {
|
||||||
tracing::trace!("blocking installing solc version \"{}\"", version);
|
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))?;
|
tokio::runtime::Runtime::new().unwrap().block_on(svm::install(version))?;
|
||||||
report::solc_installation_success(version);
|
crate::report::solc_installation_success(version);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -571,11 +571,11 @@ impl<Artifacts: ArtifactOutput> ArtifactOutput for Project<Artifacts> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
#[cfg(all(feature = "svm", feature = "async"))]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::remappings::Remapping;
|
use crate::remappings::Remapping;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(all(feature = "svm", feature = "async"))]
|
|
||||||
fn test_build_all_versions() {
|
fn test_build_all_versions() {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -593,7 +593,6 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(all(feature = "svm", feature = "async"))]
|
|
||||||
fn test_build_many_libs() {
|
fn test_build_many_libs() {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -625,7 +624,6 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(all(feature = "svm", feature = "async"))]
|
|
||||||
fn test_build_remappings() {
|
fn test_build_remappings() {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
|
|
@ -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));
|
with_global(|r| r.reporter.on_solc_success(solc, version, output));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
pub(crate) fn solc_installation_start(version: &Version) {
|
pub(crate) fn solc_installation_start(version: &Version) {
|
||||||
with_global(|r| r.reporter.on_solc_installation_start(version));
|
with_global(|r| r.reporter.on_solc_installation_start(version));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
pub(crate) fn solc_installation_success(version: &Version) {
|
pub(crate) fn solc_installation_success(version: &Version) {
|
||||||
with_global(|r| r.reporter.on_solc_installation_success(version));
|
with_global(|r| r.reporter.on_solc_installation_success(version));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue