1
Fork 0

libserialize: use #[deriving(Copy)]

This commit is contained in:
Jorge Aparicio 2014-12-14 23:20:43 -05:00
parent 1d25271e05
commit 2df30a47e2
3 changed files with 7 additions and 16 deletions

View file

@ -226,7 +226,7 @@ pub type Array = Vec<Json>;
pub type Object = BTreeMap<string::String, Json>;
/// The errors that can arise while parsing a JSON stream.
#[deriving(Clone, PartialEq)]
#[deriving(Clone, Copy, PartialEq)]
pub enum ErrorCode {
InvalidSyntax,
InvalidNumber,
@ -247,17 +247,13 @@ pub enum ErrorCode {
NotUtf8,
}
impl Copy for ErrorCode {}
#[deriving(Clone, PartialEq, Show)]
#[deriving(Clone, Copy, PartialEq, Show)]
pub enum ParserError {
/// msg, line, col
SyntaxError(ErrorCode, uint, uint),
IoError(io::IoErrorKind, &'static str),
}
impl Copy for ParserError {}
// Builder and Parser have the same errors.
pub type BuilderError = ParserError;