fixed compilation errors

This commit is contained in:
debris 2016-05-18 13:49:23 +02:00
parent 57b0be2a0b
commit 407f046b9c
2 changed files with 3 additions and 10 deletions

View File

@ -53,7 +53,7 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
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());

View File

@ -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)