about summary refs log tree commit diff
path: root/src/libstd/json.rs
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2013-03-22 16:09:20 -0400
committerAndrew Paseltiner <apaseltiner@gmail.com>2013-03-23 06:57:30 -0400
commit45677eebf286a39c29d9cd789e76ea1cf2d2b1d0 (patch)
tree04b5fbbe19377386b540c192fba0568463da46c1 /src/libstd/json.rs
parent2b83defa4a48303db642f38e2a9f24460756721d (diff)
downloadrust-45677eebf286a39c29d9cd789e76ea1cf2d2b1d0.tar.gz
rust-45677eebf286a39c29d9cd789e76ea1cf2d2b1d0.zip
replace impls with `deriving` where applicable
Diffstat (limited to 'src/libstd/json.rs')
-rw-r--r--src/libstd/json.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index f1f736e01a1..a9b9b2977cd 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -35,6 +35,7 @@ pub enum Json {
 pub type List = ~[Json];
 pub type Object = LinearMap<~str, Json>;
 
+#[deriving(Eq)]
 pub struct Error {
     line: uint,
     col: uint,
@@ -1060,15 +1061,6 @@ impl Ord for Json {
     fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self))  }
 }
 
-impl Eq for Error {
-    fn eq(&self, other: &Error) -> bool {
-        (*self).line == other.line &&
-        (*self).col == other.col &&
-        (*self).msg == other.msg
-    }
-    fn ne(&self, other: &Error) -> bool { !(*self).eq(other) }
-}
-
 trait ToJson { fn to_json(&self) -> Json; }
 
 impl ToJson for Json {