diff --git a/src/json/error.rs b/src/json/error.rs index 53a9b0e1..48f6df16 100644 --- a/src/json/error.rs +++ b/src/json/error.rs @@ -77,7 +77,7 @@ impl fmt::Debug for ErrorCode { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Debug)] pub enum Error { /// msg, line, col SyntaxError(ErrorCode, usize, usize), @@ -139,14 +139,14 @@ impl fmt::Display for Error { } } -impl error::FromError for Error { - fn from_error(error: io::Error) -> Error { +impl From for Error { + fn from(error: io::Error) -> Error { Error::IoError(error) } } -impl error::FromError for Error { - fn from_error(error: de::value::Error) -> Error { +impl From for Error { + fn from(error: de::value::Error) -> Error { match error { de::value::Error::SyntaxError => { de::Error::syntax_error() diff --git a/src/lib.rs b/src/lib.rs index 77bec3b1..6abdd4e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ //! leaving serde to perform roughly the same speed as a hand written serializer for a specific //! type. -#![feature(collections, convert, core, std_misc, unicode)] +#![feature(collections, core, std_misc, unicode)] extern crate unicode;