diff --git a/ethcore/src/client/client.rs b/ethcore/src/client/client.rs index d5e509e62f9..99617023a7a 100644 --- a/ethcore/src/client/client.rs +++ b/ethcore/src/client/client.rs @@ -348,7 +348,7 @@ impl Client { imported } - fn commit_block(&self, block: B, hash: &H256, block_data: &Bytes) -> ImportRoute where B: IsBlock + Drain { + fn commit_block(&self, block: B, hash: &H256, block_data: &[u8]) -> ImportRoute where B: IsBlock + Drain { let number = block.header().number(); // Are we committing an era? let ancient = if number >= HISTORY { diff --git a/ethcore/src/miner/work_notify.rs b/ethcore/src/miner/work_notify.rs index a153be79f68..ea2f6140eda 100644 --- a/ethcore/src/miner/work_notify.rs +++ b/ethcore/src/miner/work_notify.rs @@ -52,10 +52,10 @@ impl WorkPoster { } fn create_client() -> Client { - let client = Client::::configure() + Client::::configure() .keep_alive(true) - .build().expect("Error creating HTTP client") as Client; - client + .build() + .expect("Error creating HTTP client") } pub fn notify(&self, pow_hash: H256, difficulty: U256, number: u64) { @@ -63,8 +63,10 @@ impl WorkPoster { let target = Ethash::difficulty_to_boundary(&difficulty); let seed_hash = &self.seed_compute.lock().unwrap().get_seedhash(number); let seed_hash = H256::from_slice(&seed_hash[..]); - let body = format!(r#"{{ "result": ["0x{}","0x{}","0x{}","0x{:x}"] }}"#, - pow_hash.hex(), seed_hash.hex(), target.hex(), number); + let body = format!( + r#"{{ "result": ["0x{}","0x{}","0x{}","0x{:x}"] }}"#, + pow_hash.hex(), seed_hash.hex(), target.hex(), number + ); let mut client = self.client.lock().unwrap(); for u in &self.urls { if let Err(e) = client.request(u.clone(), PostHandler { body: body.clone() }) { @@ -104,12 +106,12 @@ impl hyper::client::Handler for PostHandler { } fn on_response_readable(&mut self, _decoder: &mut hyper::Decoder) -> Next { - Next::end() + Next::end() } - fn on_error(&mut self, err: hyper::Error) -> Next { + fn on_error(&mut self, err: hyper::Error) -> Next { trace!("Error posting work data: {}", err); Next::end() - } + } } diff --git a/util/bigint/src/uint.rs b/util/bigint/src/uint.rs index 2b986313520..1ea03679a47 100644 --- a/util/bigint/src/uint.rs +++ b/util/bigint/src/uint.rs @@ -43,7 +43,7 @@ use std::cmp; use std::str::{FromStr}; use std::convert::From; -use std::hash::{Hash, Hasher}; +use std::hash::Hash; use std::ops::*; use std::cmp::*; diff --git a/util/src/network/host.rs b/util/src/network/host.rs index a48d1544cdd..a8bbc17e52a 100644 --- a/util/src/network/host.rs +++ b/util/src/network/host.rs @@ -539,7 +539,7 @@ impl Host where Message: Send + Sync + Clone { self.info.write().unwrap().public_endpoint = Some(public_endpoint.clone()); if self.first_time.load(AtomicOrdering::Relaxed) { - info!("Public node URL: {}", paint(White.bold(), format!("{}", self.external_url().unwrap()))); + info!("Public node URL: {}", paint(White.bold(), self.external_url().unwrap())); self.first_time.store(false, AtomicOrdering::Relaxed); }