diff --git a/ethcore/src/miner/banning_queue.rs b/ethcore/src/miner/banning_queue.rs index 0329503bf..f127dc7e8 100644 --- a/ethcore/src/miner/banning_queue.rs +++ b/ethcore/src/miner/banning_queue.rs @@ -130,7 +130,7 @@ impl BanningTransactionQueue { // Ban sender let sender_banned = self.ban_sender(sender); // Ban recipient and codehash - let is_banned = sender_banned || match transaction.action { + let recipient_or_code_banned = match transaction.action { Action::Call(recipient) => { self.ban_recipient(recipient) }, @@ -138,7 +138,7 @@ impl BanningTransactionQueue { self.ban_codehash(transaction.data.sha3()) }, }; - is_banned + sender_banned || recipient_or_code_banned }, None => false, } diff --git a/ethcore/src/miner/transaction_queue.rs b/ethcore/src/miner/transaction_queue.rs index f8baf8989..51c1863f6 100644 --- a/ethcore/src/miner/transaction_queue.rs +++ b/ethcore/src/miner/transaction_queue.rs @@ -110,6 +110,7 @@ impl PartialOrd for TransactionOrigin { } impl Ord for TransactionOrigin { + #[cfg_attr(feature="dev", allow(match_same_arms))] fn cmp(&self, other: &TransactionOrigin) -> Ordering { if *other == *self { return Ordering::Equal; diff --git a/ethcore/src/snapshot/account.rs b/ethcore/src/snapshot/account.rs index 7e4585365..38a4028e1 100644 --- a/ethcore/src/snapshot/account.rs +++ b/ethcore/src/snapshot/account.rs @@ -178,7 +178,7 @@ impl Account { CodeState::Hash => { let code_hash = try!(rlp.val_at(3)); if let Some(code) = code_map.get(&code_hash) { - acct_db.emplace(code_hash.clone(), DBValue::from_slice(&code)); + acct_db.emplace(code_hash.clone(), DBValue::from_slice(code)); } (code_hash, None) diff --git a/parity/informant.rs b/parity/informant.rs index 9b0b6c754..ae59cb9d0 100644 --- a/parity/informant.rs +++ b/parity/informant.rs @@ -184,7 +184,7 @@ impl ChainNotify for Informant { let ripe = Instant::now() > *last_import + Duration::from_secs(1) && !importing; let txs_imported = imported.iter() .take(imported.len() - if ripe {1} else {0}) - .filter_map(|h| self.client.block(BlockID::Hash(h.clone()))) + .filter_map(|h| self.client.block(BlockID::Hash(*h))) .map(|b| BlockView::new(&b).transactions_count()) .sum(); diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 06949682b..72df47c07 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1509,7 +1509,7 @@ impl ChainSync { } trace!(target: "sync", "{} -> GetNodeData: return {} entries", peer_id, added); let mut rlp = RlpStream::new_list(added); - for d in data.into_iter() { + for d in data { rlp.append(&d); } Ok(Some((NODE_DATA_PACKET, rlp))) diff --git a/util/src/trie/triedb.rs b/util/src/trie/triedb.rs index cd8c9939a..d929c9d68 100644 --- a/util/src/trie/triedb.rs +++ b/util/src/trie/triedb.rs @@ -133,7 +133,7 @@ impl<'db> TrieDB<'db> { } /// Get the data of the root node. - fn root_data<'a, R: 'a + Recorder>(&self, r: &'a mut R) -> super::Result { + fn root_data(&self, r: &mut R) -> super::Result { self.db.get(self.root).ok_or_else(|| Box::new(TrieError::InvalidStateRoot(*self.root))) .map(|node| { r.record(self.root, &*node, 0); node }) }