diff --git a/Cargo.lock b/Cargo.lock index ca0f20449..7c1bdbfaf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ name = "parity" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "ctrlc 1.1.1 (git+https://github.com/tomusdrw/rust-ctrlc.git)", "daemonize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)", @@ -99,7 +99,7 @@ dependencies = [ [[package]] name = "clippy" -version = "0.0.61" +version = "0.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quine-mc_cluskey 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -231,7 +231,7 @@ dependencies = [ name = "ethcore" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.1.0", @@ -258,7 +258,7 @@ dependencies = [ name = "ethcore-rpc" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "ethash 1.1.0", "ethcore 1.1.0", "ethcore-util 1.1.0", @@ -282,7 +282,7 @@ dependencies = [ "arrayvec 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "bigint 0.1.0", "chrono 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "elastic-array 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -314,7 +314,7 @@ dependencies = [ name = "ethcore-webapp" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore-rpc 1.1.0", "ethcore-util 1.1.0", "hyper 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -343,7 +343,7 @@ dependencies = [ name = "ethminer" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.1.0", "ethcore-util 1.1.0", @@ -357,7 +357,7 @@ dependencies = [ name = "ethsync" version = "1.1.0" dependencies = [ - "clippy 0.0.61 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "ethcore 1.1.0", "ethcore-util 1.1.0", diff --git a/Cargo.toml b/Cargo.toml index 2f0d0789c..6f1a70d76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ daemonize = "0.2" num_cpus = "0.2" number_prefix = "0.2" rpassword = "0.1" -clippy = { version = "0.0.61", optional = true} +clippy = { version = "0.0.63", optional = true} ethcore = { path = "ethcore" } ethcore-util = { path = "util" } ethsync = { path = "sync" } diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 6a158bb86..a43092b22 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -17,7 +17,7 @@ ethcore-util = { path = "../util" } evmjit = { path = "../evmjit", optional = true } ethash = { path = "../ethash" } num_cpus = "0.2" -clippy = { version = "0.0.61", optional = true} +clippy = { version = "0.0.63", optional = true} crossbeam = "0.1.5" lazy_static = "0.1" ethcore-devtools = { path = "../devtools" } diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs index fc2f837ef..bd30e0fb6 100644 --- a/ethcore/src/executive.rs +++ b/ethcore/src/executive.rs @@ -140,10 +140,8 @@ impl<'a> Executive<'a> { let init_gas = t.gas - base_gas_required; // validate transaction nonce - if check_nonce { - if t.nonce != nonce { - return Err(From::from(ExecutionError::InvalidNonce { expected: nonce, got: t.nonce })); - } + if check_nonce && t.nonce != nonce { + return Err(From::from(ExecutionError::InvalidNonce { expected: nonce, got: t.nonce })); } // validate if transaction fits into given block diff --git a/ethcore/src/externalities.rs b/ethcore/src/externalities.rs index e5e232a98..1c0bb417f 100644 --- a/ethcore/src/externalities.rs +++ b/ethcore/src/externalities.rs @@ -67,6 +67,8 @@ pub struct Externalities<'a, T> where T: 'a + Tracer { } impl<'a, T> Externalities<'a, T> where T: 'a + Tracer { + + #[cfg_attr(feature="dev", allow(too_many_arguments))] /// Basic `Externalities` constructor. pub fn new(state: &'a mut State, env_info: &'a EnvInfo, diff --git a/ethcore/src/substate.rs b/ethcore/src/substate.rs index f643fea07..65b314663 100644 --- a/ethcore/src/substate.rs +++ b/ethcore/src/substate.rs @@ -19,7 +19,7 @@ use common::*; /// State changes which should be applied in finalize, /// after transaction is fully executed. -#[derive(Debug)] +#[derive(Debug, Default)] pub struct Substate { /// Any accounts that have suicided. pub suicides: HashSet
, diff --git a/ethcore/src/trace/trace.rs b/ethcore/src/trace/trace.rs index b0e2e75f5..6a90aaf8a 100644 --- a/ethcore/src/trace/trace.rs +++ b/ethcore/src/trace/trace.rs @@ -17,7 +17,7 @@ //! Tracing datatypes. use common::*; -/// TraceCall result. +/// `TraceCall` result. #[derive(Debug, Clone, PartialEq, Default)] pub struct TraceCallResult { /// Gas used by call. @@ -26,7 +26,7 @@ pub struct TraceCallResult { pub output: Bytes, } -/// TraceCreate result. +/// `TraceCreate` result. #[derive(Debug, Clone, PartialEq)] pub struct TraceCreateResult { /// Gas used by create. diff --git a/json/Cargo.toml b/json/Cargo.toml index e4ae13e5b..ce15894e4 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -10,7 +10,7 @@ rustc-serialize = "0.3" serde = "0.7.0" serde_json = "0.7.0" serde_macros = { version = "0.7.0", optional = true } -clippy = { version = "0.0.61", optional = true} +clippy = { version = "0.0.63", optional = true} [build-dependencies] serde_codegen = { version = "0.7.0", optional = true } diff --git a/miner/Cargo.toml b/miner/Cargo.toml index 18bf78104..f5ecb94a9 100644 --- a/miner/Cargo.toml +++ b/miner/Cargo.toml @@ -17,7 +17,7 @@ log = "0.3" env_logger = "0.3" rustc-serialize = "0.3" rayon = "0.3.1" -clippy = { version = "0.0.61", optional = true} +clippy = { version = "0.0.63", optional = true} [features] default = [] diff --git a/parity/upgrade.rs b/parity/upgrade.rs index c9c98e174..da01c039e 100644 --- a/parity/upgrade.rs +++ b/parity/upgrade.rs @@ -22,6 +22,7 @@ use std::fs::File; use std::env; use std::io::{Read, Write}; +#[cfg_attr(feature="dev", allow(enum_variant_names))] #[derive(Debug)] pub enum Error { CannotLockVersionFile, @@ -107,16 +108,12 @@ fn with_locked_version(script: F) -> Result }) .unwrap_or_else(|| Version::parse("0.9.0").unwrap()); - let script_result = { - let mut lock = try!(File::create(&path).map_err(|_| Error::CannotLockVersionFile)); - let result = script(&version); + let mut lock = try!(File::create(&path).map_err(|_| Error::CannotLockVersionFile)); + let result = script(&version); - let written_version = Version::parse(CURRENT_VERSION).unwrap(); - try!(lock.write_all(written_version.to_string().as_bytes()).map_err(|_| Error::CannotUpdateVersionFile)); - result - }; - - script_result + let written_version = Version::parse(CURRENT_VERSION).unwrap(); + try!(lock.write_all(written_version.to_string().as_bytes()).map_err(|_| Error::CannotUpdateVersionFile)); + result } pub fn upgrade() -> Result { diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 0fa7a9cd9..9d913e19b 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -22,7 +22,7 @@ ethminer = { path = "../miner" } rustc-serialize = "0.3" transient-hashmap = "0.1" serde_macros = { version = "0.7.0", optional = true } -clippy = { version = "0.0.61", optional = true} +clippy = { version = "0.0.63", optional = true} [build-dependencies] serde_codegen = { version = "0.7.0", optional = true } diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 842924ba0..e6f17557b 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -10,7 +10,7 @@ authors = ["Ethcore