From 407f046b9cc3126c279c1922df993dc38238dcab Mon Sep 17 00:00:00 2001 From: debris Date: Wed, 18 May 2016 13:49:23 +0200 Subject: [PATCH] fixed compilation errors --- ethcore/src/json_tests/chain.rs | 2 +- ethcore/src/trace/error.rs | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/ethcore/src/json_tests/chain.rs b/ethcore/src/json_tests/chain.rs index 9413d025a..a1154f6a9 100644 --- a/ethcore/src/json_tests/chain.rs +++ b/ethcore/src/json_tests/chain.rs @@ -53,7 +53,7 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec { let temp = RandomTempPath::new(); { - let client = Client::new(ClientConfig::default(), spec, temp.as_path(), IoChannel::disconnected()); + let client = Client::new(ClientConfig::default(), spec, temp.as_path(), IoChannel::disconnected()).unwrap(); for b in &blockchain.blocks_rlp() { if Block::is_good(&b) { let _ = client.import_block(b.clone()); diff --git a/ethcore/src/trace/error.rs b/ethcore/src/trace/error.rs index 0f3cbc62c..a02b9a4aa 100644 --- a/ethcore/src/trace/error.rs +++ b/ethcore/src/trace/error.rs @@ -16,7 +16,7 @@ //! TraceDB errors. -use std::fmt::{Debug, Display, Formatter, Error as FmtError}; +use std::fmt::{Display, Formatter, Error as FmtError}; const RESYNC_ERR: &'static str = "Your current parity installation has synced without transaction tracing. To use @@ -27,20 +27,13 @@ database and restart parity. e.g.: > parity"; /// TraceDB errors. +#[derive(Debug)] pub enum Error { /// Returned when tracing is enabled, /// but database does not contain traces of old transactions. ResyncRequired, } -/// TODO: replace `Debug` with default implementation, -/// once we stop using it to display errors to user. -impl Debug for Error { - fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> { - write!(f, "{}", RESYNC_ERR) - } -} - impl Display for Error { fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> { write!(f, "{}", RESYNC_ERR)