Merge pull request #1403 from ethcore/bump-clippy

Bump clippy
This commit is contained in:
Robert Habermeier
2016-06-23 14:23:46 +02:00
committed by GitHub
16 changed files with 29 additions and 25 deletions

View File

@@ -22,7 +22,7 @@ ethcore-util = { path = "../util" }
evmjit = { path = "../evmjit", optional = true }
ethash = { path = "../ethash" }
num_cpus = "0.2"
clippy = { version = "0.0.76", optional = true}
clippy = { version = "0.0.77", optional = true}
crossbeam = "0.2.9"
lazy_static = "0.2"
ethcore-devtools = { path = "../devtools" }

View File

@@ -490,6 +490,7 @@ pub fn enact(
}
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header
#[cfg_attr(feature="dev", allow(too_many_arguments))]
pub fn enact_bytes(
block_bytes: &[u8],
engine: &Engine,
@@ -506,6 +507,7 @@ pub fn enact_bytes(
}
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header
#[cfg_attr(feature="dev", allow(too_many_arguments))]
pub fn enact_verified(
block: &PreverifiedBlock,
engine: &Engine,
@@ -521,6 +523,7 @@ pub fn enact_verified(
}
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header. Seal the block aferwards
#[cfg_attr(feature="dev", allow(too_many_arguments))]
pub fn enact_and_seal(
block_bytes: &[u8],
engine: &Engine,

View File

@@ -228,7 +228,7 @@ pub enum Error {
/// The value of the nonce or mishash is invalid.
PowInvalid,
/// Error concerning TrieDBs
TrieError(TrieError),
Trie(TrieError),
}
impl fmt::Display for Error {
@@ -244,7 +244,7 @@ impl fmt::Display for Error {
f.write_fmt(format_args!("Unknown engine name ({})", name)),
Error::PowHashInvalid => f.write_str("Invalid or out of date PoW hash."),
Error::PowInvalid => f.write_str("Invalid nonce or mishash"),
Error::TrieError(ref err) => f.write_fmt(format_args!("{}", err)),
Error::Trie(ref err) => f.write_fmt(format_args!("{}", err)),
}
}
}
@@ -308,7 +308,7 @@ impl From<IoError> for Error {
impl From<TrieError> for Error {
fn from(err: TrieError) -> Error {
Error::TrieError(err)
Error::Trie(err)
}
}

View File

@@ -106,7 +106,7 @@ impl Engine for Ethash {
} else {
let mut s = Schedule::new_homestead();
if self.ethash_params.dao_rescue_soft_fork {
s.reject_dao_transactions = env_info.dao_rescue_block_gas_limit.map(|x| x <= 4_000_000.into()).unwrap_or(false);
s.reject_dao_transactions = env_info.dao_rescue_block_gas_limit.map_or(false, |x| x <= 4_000_000.into());
}
s
}