From 52f4034bdda1deab91e8e7bbae21934e7edf98fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 1 Jul 2016 02:21:22 +0200 Subject: [PATCH] Formatting --- ethcore/src/miner/work_notify.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ethcore/src/miner/work_notify.rs b/ethcore/src/miner/work_notify.rs index ba45e5b70..ea2f6140e 100644 --- a/ethcore/src/miner/work_notify.rs +++ b/ethcore/src/miner/work_notify.rs @@ -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() - } + } }