From feb014eb3c3aa1ccaae1df407801dffa090499fd Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 7 Sep 2012 12:06:02 -0700 Subject: rustc: Add an "ne" method to the Eq trait, and implement it everywhere --- src/libstd/json.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/json.rs') diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 161fdf53b99..f2207f2a913 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -609,12 +609,12 @@ impl Error : Eq { self.col == other.col && self.msg == other.msg } + pure fn ne(&&other: Error) -> bool { !self.eq(other) } } impl Json : Eq { - pure fn eq(&&other: Json) -> bool { - eq(self, other) - } + pure fn eq(&&other: Json) -> bool { eq(self, other) } + pure fn ne(&&other: Json) -> bool { !self.eq(other) } } trait ToJson { fn to_json() -> Json; } -- cgit 1.4.1-3-g733a5