From 6bdeefd27ec34e570fd95924178cf728f00baf5d Mon Sep 17 00:00:00 2001 From: jaspervdm Date: Tue, 25 Feb 2020 18:33:50 +0100 Subject: [PATCH] Fix warnings (#3240) --- core/src/consensus.rs | 12 ++++++------ keychain/src/extkey_bip32.rs | 10 ---------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/core/src/consensus.rs b/core/src/consensus.rs index 27db006ecd..94218e4af1 100644 --- a/core/src/consensus.rs +++ b/core/src/consensus.rs @@ -148,22 +148,22 @@ pub fn header_version(height: u64) -> HeaderVersion { global::ChainTypes::Mainnet => HeaderVersion(hf_interval), global::ChainTypes::Floonet => { if height < FLOONET_FIRST_HARD_FORK { - (HeaderVersion(1)) + HeaderVersion(1) } else if height < FLOONET_SECOND_HARD_FORK { - (HeaderVersion(2)) + HeaderVersion(2) } else if height < 3 * HARD_FORK_INTERVAL { - (HeaderVersion(3)) + HeaderVersion(3) } else { HeaderVersion(hf_interval) } } global::ChainTypes::AutomatedTesting | global::ChainTypes::UserTesting => { if height < TESTING_FIRST_HARD_FORK { - (HeaderVersion(1)) + HeaderVersion(1) } else if height < TESTING_SECOND_HARD_FORK { - (HeaderVersion(2)) + HeaderVersion(2) } else if height < 3 * HARD_FORK_INTERVAL { - (HeaderVersion(3)) + HeaderVersion(3) } else { HeaderVersion(hf_interval) } diff --git a/keychain/src/extkey_bip32.rs b/keychain/src/extkey_bip32.rs index b47763d8bd..d3412b30fe 100644 --- a/keychain/src/extkey_bip32.rs +++ b/keychain/src/extkey_bip32.rs @@ -333,16 +333,6 @@ impl error::Error for Error { None } } - - fn description(&self) -> &str { - match *self { - Error::CannotDeriveFromHardenedKey => "cannot derive hardened key from public key", - Error::Ecdsa(ref e) => error::Error::description(e), - Error::InvalidChildNumber(_) => "child number is invalid", - Error::RngError(_) => "rng error", - Error::MnemonicError(_) => "mnemonic error", - } - } } impl From for Error {