Merge pull request #1354 from ethcore/warnings-fix
Fixing clippy warnings
This commit is contained in:
commit
855ae91c4c
@ -236,7 +236,6 @@ impl AccountProvider {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::AccountProvider;
|
use super::AccountProvider;
|
||||||
use ethstore::SecretStore;
|
|
||||||
use ethstore::ethkey::{Generator, Random};
|
use ethstore::ethkey::{Generator, Random};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -292,9 +292,10 @@ impl Configuration {
|
|||||||
}).collect::<Vec<_>>();
|
}).collect::<Vec<_>>();
|
||||||
|
|
||||||
if !self.args.flag_no_import_keys {
|
if !self.args.flag_no_import_keys {
|
||||||
let dir_type = match self.args.flag_testnet {
|
let dir_type = if self.args.flag_testnet {
|
||||||
true => DirectoryType::Testnet,
|
DirectoryType::Testnet
|
||||||
false => DirectoryType::Main,
|
} else {
|
||||||
|
DirectoryType::Main
|
||||||
};
|
};
|
||||||
|
|
||||||
let from = GethDirectory::open(dir_type);
|
let from = GethDirectory::open(dir_type);
|
||||||
|
@ -39,9 +39,8 @@ impl IoHandler<NetSyncMessage> for ClientIoHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn timeout(&self, _io: &IoContext<NetSyncMessage>, timer: TimerToken) {
|
fn timeout(&self, _io: &IoContext<NetSyncMessage>, timer: TimerToken) {
|
||||||
match timer {
|
if let INFO_TIMER = timer {
|
||||||
INFO_TIMER => { self.info.tick(&self.client, Some(&self.sync)); }
|
self.info.tick(&self.client, Some(&self.sync));
|
||||||
_ => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ fn execute_signer(conf: Configuration) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn execute_account_cli(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::ethstore::dir::DiskDirectory;
|
||||||
use ethcore::account_provider::AccountProvider;
|
use ethcore::account_provider::AccountProvider;
|
||||||
use rpassword::read_password;
|
use rpassword::read_password;
|
||||||
|
@ -684,14 +684,11 @@ impl<Message> Host<Message> where Message: Send + Sync + Clone {
|
|||||||
match s.readable(io, &self.info.read().unwrap()) {
|
match s.readable(io, &self.info.read().unwrap()) {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
trace!(target: "network", "Session read error: {}:{:?} ({:?}) {:?}", token, s.id(), s.remote_addr(), e);
|
trace!(target: "network", "Session read error: {}:{:?} ({:?}) {:?}", token, s.id(), s.remote_addr(), e);
|
||||||
match e {
|
if let UtilError::Network(NetworkError::Disconnect(DisconnectReason::IncompatibleProtocol)) = e {
|
||||||
UtilError::Network(NetworkError::Disconnect(DisconnectReason::IncompatibleProtocol)) => {
|
|
||||||
if let Some(id) = s.id() {
|
if let Some(id) = s.id() {
|
||||||
self.nodes.write().unwrap().mark_as_useless(id);
|
self.nodes.write().unwrap().mark_as_useless(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => (),
|
|
||||||
}
|
|
||||||
kill = true;
|
kill = true;
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user