libserialize: use #[deriving(Copy)]
This commit is contained in:
parent
1d25271e05
commit
2df30a47e2
3 changed files with 7 additions and 16 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue