Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1354 from ethcore/warnings-fix
Browse files Browse the repository at this point in the history
Fixing clippy warnings
  • Loading branch information
arkpar authored Jun 20, 2016
2 parents 5705ecf + da7b306 commit 855ae91
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion ethcore/src/account_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ impl AccountProvider {
#[cfg(test)]
mod tests {
use super::AccountProvider;
use ethstore::SecretStore;
use ethstore::ethkey::{Generator, Random};

#[test]
Expand Down
7 changes: 4 additions & 3 deletions parity/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,10 @@ impl Configuration {
}).collect::<Vec<_>>();

if !self.args.flag_no_import_keys {
let dir_type = match self.args.flag_testnet {
true => DirectoryType::Testnet,
false => DirectoryType::Main,
let dir_type = if self.args.flag_testnet {
DirectoryType::Testnet
} else {
DirectoryType::Main
};

let from = GethDirectory::open(dir_type);
Expand Down
5 changes: 2 additions & 3 deletions parity/io_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
}

fn timeout(&self, _io: &IoContext<NetSyncMessage>, timer: TimerToken) {
match timer {
INFO_TIMER => { self.info.tick(&self.client, Some(&self.sync)); }
_ => {}
if let INFO_TIMER = timer {
self.info.tick(&self.client, Some(&self.sync));
}
}

Expand Down
2 changes: 1 addition & 1 deletion parity/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ fn execute_signer(conf: Configuration) {
}

fn execute_account_cli(conf: Configuration) {
use ethcore::ethstore::{SecretStore, EthStore, import_accounts};
use ethcore::ethstore::{EthStore, import_accounts};
use ethcore::ethstore::dir::DiskDirectory;
use ethcore::account_provider::AccountProvider;
use rpassword::read_password;
Expand Down
9 changes: 3 additions & 6 deletions util/src/network/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,10 @@ impl<Message> Host<Message> where Message: Send + Sync + Clone {
match s.readable(io, &self.info.read().unwrap()) {
Err(e) => {
trace!(target: "network", "Session read error: {}:{:?} ({:?}) {:?}", token, s.id(), s.remote_addr(), e);
match e {
UtilError::Network(NetworkError::Disconnect(DisconnectReason::IncompatibleProtocol)) => {
if let Some(id) = s.id() {
self.nodes.write().unwrap().mark_as_useless(id);
}
if let UtilError::Network(NetworkError::Disconnect(DisconnectReason::IncompatibleProtocol)) = e {
if let Some(id) = s.id() {
self.nodes.write().unwrap().mark_as_useless(id);
}
_ => (),
}
kill = true;
break;
Expand Down

0 comments on commit 855ae91

Please sign in to comment.