about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2011-08-23 18:25:50 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2011-08-25 18:24:45 -0700
commitd9bc3cb10c4d1e856998c8e35ce7d89e0d74f4d6 (patch)
tree1c61d6788336a0e076328f76cc33d792dad92f37 /src/lib
parent1cb85015c397cefa9de7653a98b7572ef511e0ef (diff)
downloadrust-d9bc3cb10c4d1e856998c8e35ce7d89e0d74f4d6.tar.gz
rust-d9bc3cb10c4d1e856998c8e35ce7d89e0d74f4d6.zip
Change "pred" to "pure fn" in all libraries and test cases
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/char.rs2
-rw-r--r--src/lib/istr.rs4
-rw-r--r--src/lib/uint.rs12
-rw-r--r--src/lib/vec.rs4
4 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/char.rs b/src/lib/char.rs
index 634c9b9647c..cbd8f667b86 100644
--- a/src/lib/char.rs
+++ b/src/lib/char.rs
@@ -1,4 +1,4 @@
-pred is_whitespace(c: char) -> bool {
+pure fn is_whitespace(c: char) -> bool {
     const ch_space: char = '\u0020';
     const ch_ogham_space_mark: char = '\u1680';
     const ch_mongolian_vowel_sep: char = '\u180e';
diff --git a/src/lib/istr.rs b/src/lib/istr.rs
index b679093cea3..9b3e45e8c53 100644
--- a/src/lib/istr.rs
+++ b/src/lib/istr.rs
@@ -73,12 +73,12 @@ fn is_ascii(s: &istr) -> bool {
 }
 
 /// Returns true if the string has length 0
-pred is_empty(s: &istr) -> bool {
+pure fn is_empty(s: &istr) -> bool {
     for c: u8 in s { ret false; } ret true;
 }
 
 /// Returns true if the string has length greater than 0
-pred is_not_empty(s: &istr) -> bool {
+pure fn is_not_empty(s: &istr) -> bool {
     !is_empty(s)
 }
 
diff --git a/src/lib/uint.rs b/src/lib/uint.rs
index 657138cea9c..3553dc7e2cf 100644
--- a/src/lib/uint.rs
+++ b/src/lib/uint.rs
@@ -10,17 +10,17 @@ fn div(x: uint, y: uint) -> uint { ret x / y; }
 
 fn rem(x: uint, y: uint) -> uint { ret x % y; }
 
-pred lt(x: uint, y: uint) -> bool { ret x < y; }
+pure fn lt(x: uint, y: uint) -> bool { ret x < y; }
 
-pred le(x: uint, y: uint) -> bool { ret x <= y; }
+pure fn le(x: uint, y: uint) -> bool { ret x <= y; }
 
-pred eq(x: uint, y: uint) -> bool { ret x == y; }
+pure fn eq(x: uint, y: uint) -> bool { ret x == y; }
 
-pred ne(x: uint, y: uint) -> bool { ret x != y; }
+pure fn ne(x: uint, y: uint) -> bool { ret x != y; }
 
-pred ge(x: uint, y: uint) -> bool { ret x >= y; }
+pure fn ge(x: uint, y: uint) -> bool { ret x >= y; }
 
-pred gt(x: uint, y: uint) -> bool { ret x > y; }
+pure fn gt(x: uint, y: uint) -> bool { ret x > y; }
 
 fn max(x: uint, y: uint) -> uint { if x > y { ret x; } ret y; }
 
diff --git a/src/lib/vec.rs b/src/lib/vec.rs
index dde4fc7505b..f387ec75b51 100644
--- a/src/lib/vec.rs
+++ b/src/lib/vec.rs
@@ -77,13 +77,13 @@ fn from_mut<@T>(v: &[mutable T]) -> [T] {
 }
 
 // Predicates
-pred is_empty<T>(v: &[mutable? T]) -> bool {
+pure fn is_empty<T>(v: &[mutable? T]) -> bool {
     // FIXME: This would be easier if we could just call len
     for t: T in v { ret false; }
     ret true;
 }
 
-pred is_not_empty<T>(v: &[mutable? T]) -> bool { ret !is_empty(v); }
+pure fn is_not_empty<T>(v: &[mutable? T]) -> bool { ret !is_empty(v); }
 
 // Accessors