Fix compile warnings (#11595)

* Fix compile warnings

* oops

* oops

* Fix
This commit is contained in:
Artem Vorotnikov 2020-04-03 22:00:09 +03:00 committed by GitHub
parent d4b5720df0
commit 47637538e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -48,11 +48,11 @@ mod accounts {
Ok(None) Ok(None)
} }
pub fn private_tx_signer(_account_provider: Arc<AccountProvider>, _passwords: &[Password]) -> Result<Arc<::ethcore_private_tx::Signer>, String> { pub fn private_tx_signer(_account_provider: Arc<AccountProvider>, _passwords: &[Password]) -> Result<Arc<dyn (::ethcore_private_tx::Signer)>, String> {
Ok(Arc::new(::ethcore_private_tx::DummySigner)) Ok(Arc::new(::ethcore_private_tx::DummySigner))
} }
pub fn accounts_list(_account_provider: Arc<AccountProvider>) -> Arc<Fn() -> Vec<Address> + Send + Sync> { pub fn accounts_list(_account_provider: Arc<AccountProvider>) -> Arc<dyn Fn() -> Vec<Address> + Send + Sync> {
Arc::new(|| vec![]) Arc::new(|| vec![])
} }
} }

View File

@ -58,6 +58,7 @@ mod codes {
pub const REQUEST_REJECTED_LIMIT: i64 = -32041; pub const REQUEST_REJECTED_LIMIT: i64 = -32041;
pub const REQUEST_NOT_FOUND: i64 = -32042; pub const REQUEST_NOT_FOUND: i64 = -32042;
pub const ENCRYPTION_ERROR: i64 = -32055; pub const ENCRYPTION_ERROR: i64 = -32055;
#[cfg(any(test, feature = "accounts"))]
pub const ENCODING_ERROR: i64 = -32058; pub const ENCODING_ERROR: i64 = -32058;
pub const FETCH_ERROR: i64 = -32060; pub const FETCH_ERROR: i64 = -32060;
pub const NO_LIGHT_PEERS: i64 = -32065; pub const NO_LIGHT_PEERS: i64 = -32065;

View File

@ -30,6 +30,7 @@ pub enum DerivationType {
} }
/// Derivation request by hash /// Derivation request by hash
#[cfg_attr(not(any(test, feature = "accounts")), allow(unused))]
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct DeriveHash { pub struct DeriveHash {
hash: H256, hash: H256,
@ -37,7 +38,8 @@ pub struct DeriveHash {
d_type: DerivationType, d_type: DerivationType,
} }
/// Node propertoes in hierarchical derivation request /// Node properties in hierarchical derivation request
#[cfg_attr(not(any(test, feature = "accounts")), allow(unused))]
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct DeriveHierarchicalItem { pub struct DeriveHierarchicalItem {
index: u64, index: u64,