replace impls with deriving where applicable
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user