diff --git a/ethcore/src/evm/ext.rs b/ethcore/src/evm/ext.rs index f4172f10a..4986b12c8 100644 --- a/ethcore/src/evm/ext.rs +++ b/ethcore/src/evm/ext.rs @@ -67,6 +67,7 @@ pub trait Ext { /// Returns Err, if we run out of gas. /// Otherwise returns call_result which contains gas left /// and true if subcall was successfull. + #[cfg_attr(feature="dev", allow(too_many_arguments))] fn call(&mut self, gas: &U256, sender_address: &Address, diff --git a/ethcore/src/evm/interpreter.rs b/ethcore/src/evm/interpreter.rs index 7491321cb..b29fc0d41 100644 --- a/ethcore/src/evm/interpreter.rs +++ b/ethcore/src/evm/interpreter.rs @@ -521,6 +521,7 @@ impl Interpreter { Ok(overflowing!(offset.overflowing_add(size.clone()))) } + #[cfg_attr(feature="dev", allow(too_many_arguments))] fn exec_instruction(&self, gas: Gas, params: &ActionParams, diff --git a/parity/main.rs b/parity/main.rs index b8cc2a0f0..c7e534993 100644 --- a/parity/main.rs +++ b/parity/main.rs @@ -370,7 +370,7 @@ impl Configuration { fn init_nodes(&self, spec: &Spec) -> Vec { match self.args.flag_bootnodes { - Some(ref x) if x.len() > 0 => x.split(',').map(|s| { + Some(ref x) if !x.is_empty() => x.split(',').map(|s| { Self::normalize_enode(s).unwrap_or_else(|| { die!("{}: Invalid node address format given for a boot node.", s) }) @@ -409,6 +409,7 @@ impl Configuration { ret } + #[cfg_attr(feature="dev", allow(useless_format))] fn client_config(&self) -> ClientConfig { let mut client_config = ClientConfig::default(); match self.args.flag_cache { diff --git a/util/src/journaldb/archivedb.rs b/util/src/journaldb/archivedb.rs index 83a80b7c2..76f0ecc50 100644 --- a/util/src/journaldb/archivedb.rs +++ b/util/src/journaldb/archivedb.rs @@ -175,6 +175,8 @@ impl JournalDB for ArchiveDB { #[cfg(test)] mod tests { + #![cfg_attr(feature="dev", allow(blacklisted_name))] + use common::*; use super::*; use hashdb::*; @@ -371,7 +373,7 @@ mod tests { jdb.commit(5, &b"5".sha3(), Some((4, b"4".sha3()))).unwrap(); } } - + #[test] fn reopen_fork() { let mut dir = ::std::env::temp_dir(); diff --git a/util/src/journaldb/earlymergedb.rs b/util/src/journaldb/earlymergedb.rs index 7cb00b993..15dcacd6a 100644 --- a/util/src/journaldb/earlymergedb.rs +++ b/util/src/journaldb/earlymergedb.rs @@ -527,6 +527,8 @@ impl JournalDB for EarlyMergeDB { #[cfg(test)] mod tests { + #![cfg_attr(feature="dev", allow(blacklisted_name))] + use common::*; use super::*; use super::super::traits::JournalDB; diff --git a/util/src/journaldb/overlayrecentdb.rs b/util/src/journaldb/overlayrecentdb.rs index efbd26c3b..102e23407 100644 --- a/util/src/journaldb/overlayrecentdb.rs +++ b/util/src/journaldb/overlayrecentdb.rs @@ -358,6 +358,8 @@ impl HashDB for OverlayRecentDB { #[cfg(test)] mod tests { + #![cfg_attr(feature="dev", allow(blacklisted_name))] + use common::*; use super::*; use hashdb::*; diff --git a/util/src/journaldb/refcounteddb.rs b/util/src/journaldb/refcounteddb.rs index 590964247..a8c3ff12b 100644 --- a/util/src/journaldb/refcounteddb.rs +++ b/util/src/journaldb/refcounteddb.rs @@ -28,7 +28,7 @@ use std::env; /// Implementation of the HashDB trait for a disk-backed database with a memory overlay /// and latent-removal semantics. /// -/// Like OverlayDB, there is a memory overlay; `commit()` must be called in order to +/// Like OverlayDB, there is a memory overlay; `commit()` must be called in order to /// write operations out to disk. Unlike OverlayDB, `remove()` operations do not take effect /// immediately. Rather some age (based on a linear but arbitrary metric) must pass before /// the removals actually take effect. @@ -113,7 +113,7 @@ impl JournalDB for RefCountedDB { } fn commit(&mut self, now: u64, id: &H256, end: Option<(u64, H256)>) -> Result { - // journal format: + // journal format: // [era, 0] => [ id, [insert_0, ...], [remove_0, ...] ] // [era, 1] => [ id, [insert_0, ...], [remove_0, ...] ] // [era, n] => [ ... ] @@ -121,7 +121,7 @@ impl JournalDB for RefCountedDB { // TODO: store last_era, reclaim_period. // when we make a new commit, we journal the inserts and removes. - // for each end_era that we journaled that we are no passing by, + // for each end_era that we journaled that we are no passing by, // we remove all of its removes assuming it is canonical and all // of its inserts otherwise. @@ -147,7 +147,7 @@ impl JournalDB for RefCountedDB { r.append(&self.inserts); r.append(&self.removes); try!(batch.put(&last, r.as_raw())); - + trace!(target: "rcdb", "new journal for time #{}.{} => {}: inserts={:?}, removes={:?}", now, index, id, self.inserts, self.removes); self.inserts.clear(); @@ -194,6 +194,8 @@ impl JournalDB for RefCountedDB { #[cfg(test)] mod tests { + #![cfg_attr(feature="dev", allow(blacklisted_name))] + use common::*; use super::*; use super::super::traits::JournalDB; diff --git a/util/src/misc.rs b/util/src/misc.rs index 76accf93b..159381603 100644 --- a/util/src/misc.rs +++ b/util/src/misc.rs @@ -88,7 +88,7 @@ pub fn version_data() -> Bytes { u32::from_str(env!("CARGO_PKG_VERSION_PATCH")).unwrap(); s.append(&v); s.append(&"Parity"); - s.append(&format!("{}", rustc_version())); + s.append(&rustc_version()); s.append(&&Target::os()[0..2]); s.out() } diff --git a/util/src/network/ip_utils.rs b/util/src/network/ip_utils.rs index 9696c601d..b37a47064 100644 --- a/util/src/network/ip_utils.rs +++ b/util/src/network/ip_utils.rs @@ -42,7 +42,7 @@ impl SocketAddrExt for Ipv4Addr { fn is_global_s(&self) -> bool { !self.is_private() && !self.is_loopback() && !self.is_link_local() && - !self.is_broadcast() && !self.is_documentation() + !self.is_broadcast() && !self.is_documentation() } } @@ -216,6 +216,8 @@ fn can_map_external_address_or_fail() { #[test] fn ipv4_properties() { + + #![cfg_attr(feature="dev", allow(too_many_arguments))] fn check(octets: &[u8; 4], unspec: bool, loopback: bool, private: bool, link_local: bool, global: bool, multicast: bool, broadcast: bool, documentation: bool) { @@ -262,7 +264,7 @@ fn ipv6_properties() { assert_eq!(ip.is_global_s(), global); } - // unspec loopbk global + // unspec loopbk global check("::", true, false, true); check("::1", false, true, false); }