From 7459288bfc849f50e12a220d561210b259e5394a Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Sat, 4 Apr 2015 21:17:22 +0200 Subject: Update for removal of std::error::FromError --- src/lib.rs | 14 +++++++------- 1 file 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 = result::Result; -#[derive(Debug, PartialEq)] +#[derive(Debug)] pub enum IlcError { Parse(String), Chrono(ParseError), Io(io::Error) } -impl FromError for IlcError { - fn from_error(err: ParseError) -> IlcError { IlcError::Chrono(err) } +impl From for IlcError { + fn from(err: ParseError) -> IlcError { IlcError::Chrono(err) } } -impl FromError for IlcError { - fn from_error(err: io::Error) -> IlcError { IlcError::Io(err) } +impl From for IlcError { + fn from(err: io::Error) -> IlcError { IlcError::Io(err) } } -- cgit v1.2.3