fix compile warnings (#10993)

* fix warnings

* fix: failing build, use `spec` as dev-dependency
This commit is contained in:
Niklas Adolfsson
2019-08-27 17:29:33 +02:00
committed by Andronik Ordian
parent 505e284932
commit dab2a6bd4b
69 changed files with 203 additions and 199 deletions

View File

@@ -21,6 +21,7 @@
extern crate client_traits;
extern crate common_types;
extern crate ethabi;
extern crate ethabi_derive;
extern crate ethcore;
extern crate ethcore_sync as sync;
extern crate ethereum_types;
@@ -37,8 +38,6 @@ extern crate target_info;
#[macro_use]
extern crate ethabi_contract;
#[macro_use]
extern crate ethabi_derive;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;

View File

@@ -144,11 +144,11 @@ pub struct Updater<O = OperationsContractClient, F = fetch::Client, T = StdTimeP
// Useful environmental stuff.
update_policy: UpdatePolicy,
weak_self: Mutex<Weak<Updater<O, F, T, R>>>,
client: Weak<BlockChainClient>,
sync: Option<Weak<SyncProvider>>,
client: Weak<dyn BlockChainClient>,
sync: Option<Weak<dyn SyncProvider>>,
fetcher: F,
operations_client: O,
exit_handler: Mutex<Option<Box<Fn() + 'static + Send>>>,
exit_handler: Mutex<Option<Box<dyn Fn() + 'static + Send>>>,
time_provider: T,
rng: R,
@@ -205,11 +205,11 @@ pub trait OperationsClient: Send + Sync + 'static {
/// `OperationsClient` that delegates calls to the operations contract.
pub struct OperationsContractClient {
client: Weak<BlockChainClient>,
client: Weak<dyn BlockChainClient>,
}
impl OperationsContractClient {
fn new(client: Weak<BlockChainClient>) -> Self {
fn new(client: Weak<dyn BlockChainClient>) -> Self {
OperationsContractClient {
client
}
@@ -368,8 +368,8 @@ impl GenRange for ThreadRngGenRange {
impl Updater {
/// `Updater` constructor
pub fn new(
client: &Weak<BlockChainClient>,
sync: &Weak<SyncProvider>,
client: &Weak<dyn BlockChainClient>,
sync: &Weak<dyn SyncProvider>,
update_policy: UpdatePolicy,
fetcher: fetch::Client,
) -> Arc<Updater> {
@@ -756,7 +756,7 @@ pub mod tests {
#[derive(Clone)]
struct FakeFetch {
on_done: Arc<Mutex<Option<Box<Fn(Result<PathBuf, Error>) + Send>>>>,
on_done: Arc<Mutex<Option<Box<dyn Fn(Result<PathBuf, Error>) + Send>>>>,
}
impl FakeFetch {
@@ -772,7 +772,7 @@ pub mod tests {
}
impl HashFetch for FakeFetch {
fn fetch(&self, _hash: H256, _abort: fetch::Abort, on_done: Box<Fn(Result<PathBuf, Error>) + Send>) {
fn fetch(&self, _hash: H256, _abort: fetch::Abort, on_done: Box<dyn Fn(Result<PathBuf, Error>) + Send>) {
*self.on_done.lock() = Some(on_done);
}
}