From e866dceae987acd51d43bd457351bd2188c5f95a Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Tue, 23 Feb 2016 17:00:53 +0100 Subject: Test CI --- src/lib.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index e1b2db5..4772428 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ #![feature(slice_patterns)] extern crate chrono; #[macro_use] -extern crate log as l; +extern crate log; extern crate rustc_serialize; extern crate bincode; extern crate rmp; @@ -26,9 +26,9 @@ pub mod format; pub mod context; use std::convert::From; -use std::{ io, result }; +use std::{io, result}; use std::error::Error; -use std::fmt::{ self, Display, Formatter }; +use std::fmt::{self, Display, Formatter}; use chrono::format::ParseError; @@ -42,7 +42,7 @@ pub enum IlcError { BincodeEncode, MsgpackEncode(msgpack::encode::Error), MsgpackDecode(msgpack::decode::Error), - Io(io::Error) + Io(io::Error), } impl Display for IlcError { @@ -61,7 +61,7 @@ impl Error for IlcError { &BincodeEncode => "error while encoding to binary", &MsgpackDecode(_) => "error while decoding from msgpack", &MsgpackEncode(_) => "error while encoding to msgpack", - &Io(_) => "error during input/output" + &Io(_) => "error during input/output", } } @@ -74,15 +74,19 @@ impl Error for IlcError { &BincodeEncode => None, &MsgpackDecode(ref e) => Some(e), &MsgpackEncode(ref e) => Some(e), - &Io(ref e) => Some(e) + &Io(ref e) => Some(e), } } } impl From for IlcError { - fn from(err: ParseError) -> IlcError { IlcError::Chrono(err) } + fn from(err: ParseError) -> IlcError { + IlcError::Chrono(err) + } } impl From for IlcError { - fn from(err: io::Error) -> IlcError { IlcError::Io(err) } + fn from(err: io::Error) -> IlcError { + IlcError::Io(err) + } } -- cgit v1.2.3