aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTill Hoeppner2015-04-04 21:17:22 +0200
committerTill Hoeppner2015-04-04 21:17:22 +0200
commit7459288bfc849f50e12a220d561210b259e5394a (patch)
tree9a15babdd205e2eacf77b40f76df3a77e9449769 /src/lib.rs
parent9826d256eec94144469e27c159e0ec4642b2fda6 (diff)
downloadilc-7459288bfc849f50e12a220d561210b259e5394a.tar.gz
ilc-7459288bfc849f50e12a220d561210b259e5394a.tar.xz
ilc-7459288bfc849f50e12a220d561210b259e5394a.zip
Update for removal of std::error::FromError
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ac89c95..a160e4b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,4 @@
-#![feature(plugin, str_char, slice_patterns, convert, core)]
+#![feature(plugin, slice_patterns, core)]
#![plugin(regex_macros)]
extern crate regex;
extern crate chrono;
@@ -8,24 +8,24 @@ extern crate log as l;
pub mod log;
pub mod format;
-use std::error::FromError;
+use std::convert::From;
use std::{ io, result };
use chrono::format::ParseError;
pub type Result<T> = result::Result<T, IlcError>;
-#[derive(Debug, PartialEq)]
+#[derive(Debug)]
pub enum IlcError {
Parse(String),
Chrono(ParseError),
Io(io::Error)
}
-impl FromError<ParseError> for IlcError {
- fn from_error(err: ParseError) -> IlcError { IlcError::Chrono(err) }
+impl From<ParseError> for IlcError {
+ fn from(err: ParseError) -> IlcError { IlcError::Chrono(err) }
}
-impl FromError<io::Error> for IlcError {
- fn from_error(err: io::Error) -> IlcError { IlcError::Io(err) }
+impl From<io::Error> for IlcError {
+ fn from(err: io::Error) -> IlcError { IlcError::Io(err) }
}