Fixing clippy warnings

This commit is contained in:
Tomasz Drwięga 2016-05-26 11:49:58 +02:00
parent 32298cad6b
commit 5b0c936fee
3 changed files with 3 additions and 2 deletions

View File

@ -420,7 +420,7 @@ impl MinerService for Miner {
fn transaction(&self, hash: &H256) -> Option<SignedTransaction> { fn transaction(&self, hash: &H256) -> Option<SignedTransaction> {
match (self.sealing_enabled.load(atomic::Ordering::Relaxed), self.sealing_work.lock().unwrap().peek_last_ref()) { match (self.sealing_enabled.load(atomic::Ordering::Relaxed), self.sealing_work.lock().unwrap().peek_last_ref()) {
(true, Some(pending)) => pending.transactions().iter().find(|t| &t.hash() == hash).map(|t| t.clone()), (true, Some(pending)) => pending.transactions().iter().find(|t| &t.hash() == hash).cloned(),
_ => { _ => {
let queue = self.transaction_queue.lock().unwrap(); let queue = self.transaction_queue.lock().unwrap();
queue.find(hash) queue.find(hash)

View File

@ -75,6 +75,7 @@ impl Informant {
} }
} }
#[cfg_attr(feature="dev", allow(match_bool))]
pub fn tick(&self, client: &Client, maybe_sync: Option<&EthSync>) { pub fn tick(&self, client: &Client, maybe_sync: Option<&EthSync>) {
let elapsed = self.last_tick.read().unwrap().elapsed(); let elapsed = self.last_tick.read().unwrap().elapsed();
if elapsed < Duration::from_secs(5) { if elapsed < Duration::from_secs(5) {

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>. // along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! kvdb::Database as migration::Destination //! `kvdb::Database` as `migration::Destination`
use std::collections::BTreeMap; use std::collections::BTreeMap;
use kvdb::{Database, DBTransaction}; use kvdb::{Database, DBTransaction};