about summary refs log tree commit diff
path: root/src/libstd/json.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-21 21:34:30 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-22 10:29:17 -0700
commitc1084091d4e5472fac7e158b11120bad6ff210ff (patch)
tree745a42f03c8c88670da739313cd8050a5f1d8b37 /src/libstd/json.rs
parentbe9bddd46377bc982b73acf15a720365a54197a7 (diff)
downloadrust-c1084091d4e5472fac7e158b11120bad6ff210ff.tar.gz
rust-c1084091d4e5472fac7e158b11120bad6ff210ff.zip
libstd: Remove all uses of `pure` from libstd. rs=depure
Diffstat (limited to 'src/libstd/json.rs')
-rw-r--r--src/libstd/json.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/libstd/json.rs b/src/libstd/json.rs
index 00b6501ffce..0973e90dad3 100644
--- a/src/libstd/json.rs
+++ b/src/libstd/json.rs
@@ -345,7 +345,7 @@ pub fn to_writer(wr: @io::Writer, json: &Json) {
 }
 
 /// Encodes a json value into a string
-pub pure fn to_str(json: &Json) -> ~str {
+pub fn to_str(json: &Json) -> ~str {
     unsafe {
         // ugh, should be safe
         io::with_str_writer(|wr| to_writer(wr, json))
@@ -947,7 +947,7 @@ impl serialize::Decoder for Decoder/&self {
 }
 
 impl Eq for Json {
-    pure fn eq(&self, other: &Json) -> bool {
+    fn eq(&self, other: &Json) -> bool {
         match (self) {
             &Number(f0) =>
                 match other { &Number(f1) => f0 == f1, _ => false },
@@ -980,12 +980,12 @@ impl Eq for Json {
             }
         }
     }
-    pure fn ne(&self, other: &Json) -> bool { !self.eq(other) }
+    fn ne(&self, other: &Json) -> bool { !self.eq(other) }
 }
 
 /// Test if two json values are less than one another
 impl Ord for Json {
-    pure fn lt(&self, other: &Json) -> bool {
+    fn lt(&self, other: &Json) -> bool {
         match (*self) {
             Number(f0) => {
                 match *other {
@@ -1055,18 +1055,18 @@ impl Ord for Json {
             }
         }
     }
-    pure fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
-    pure fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
-    pure fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self))  }
+    fn le(&self, other: &Json) -> bool { !(*other).lt(&(*self)) }
+    fn ge(&self, other: &Json) -> bool { !(*self).lt(other) }
+    fn gt(&self, other: &Json) -> bool { (*other).lt(&(*self))  }
 }
 
 impl Eq for Error {
-    pure fn eq(&self, other: &Error) -> bool {
+    fn eq(&self, other: &Error) -> bool {
         (*self).line == other.line &&
         (*self).col == other.col &&
         (*self).msg == other.msg
     }
-    pure fn ne(&self, other: &Error) -> bool { !(*self).eq(other) }
+    fn ne(&self, other: &Error) -> bool { !(*self).eq(other) }
 }
 
 trait ToJson { fn to_json(&self) -> Json; }
@@ -1191,11 +1191,11 @@ impl<A:ToJson> ToJson for Option<A> {
 }
 
 impl to_str::ToStr for Json {
-    pure fn to_str(&self) -> ~str { to_str(self) }
+    fn to_str(&self) -> ~str { to_str(self) }
 }
 
 impl to_str::ToStr for Error {
-    pure fn to_str(&self) -> ~str {
+    fn to_str(&self) -> ~str {
         fmt!("%u:%u: %s", self.line, self.col, *self.msg)
     }
 }