aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTill Höppner2016-02-23 17:00:53 +0100
committerTill Höppner2016-02-24 18:21:24 +0100
commite866dceae987acd51d43bd457351bd2188c5f95a (patch)
tree2cc5a67492bdf00ff68041656a1e870b2b4de17f /src/lib.rs
parent815f31f5cef61709c50087c9f7601ea330929bb7 (diff)
downloadilc-e866dceae987acd51d43bd457351bd2188c5f95a.tar.gz
ilc-e866dceae987acd51d43bd457351bd2188c5f95a.tar.xz
ilc-e866dceae987acd51d43bd457351bd2188c5f95a.zip
Test CI
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs20
1 files changed, 12 insertions, 8 deletions
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<ParseError> for IlcError {
- fn from(err: ParseError) -> IlcError { IlcError::Chrono(err) }
+ fn from(err: ParseError) -> IlcError {
+ IlcError::Chrono(err)
+ }
}
impl From<io::Error> for IlcError {
- fn from(err: io::Error) -> IlcError { IlcError::Io(err) }
+ fn from(err: io::Error) -> IlcError {
+ IlcError::Io(err)
+ }
}