diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-14 23:20:43 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-19 10:51:00 -0500 |
| commit | 2df30a47e2e0ef563d9ed80cb3cc258cbea0f53a (patch) | |
| tree | ecceb5c02b019d5c4359ef0cb8cf438ce545231f /src/libserialize/json.rs | |
| parent | 1d25271e054fdefe5e940ab4cc5e098f47c46966 (diff) | |
| download | rust-2df30a47e2e0ef563d9ed80cb3cc258cbea0f53a.tar.gz rust-2df30a47e2e0ef563d9ed80cb3cc258cbea0f53a.zip | |
libserialize: use `#[deriving(Copy)]`
Diffstat (limited to 'src/libserialize/json.rs')
| -rw-r--r-- | src/libserialize/json.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 6d143329b0c..d3d1aa1d788 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -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; |
