about summary refs log tree commit diff
path: root/src/libcore/uint-template
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-01 17:30:05 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-01 19:16:06 -0700
commitb355936b4da0831f47afe8f251daee503c8caa32 (patch)
tree9f870e26f773af714cbcf7f315de5ff3722300c3 /src/libcore/uint-template
parentdc499f193e473abc78c557feaa86969bbe7aa159 (diff)
downloadrust-b355936b4da0831f47afe8f251daee503c8caa32.tar.gz
rust-b355936b4da0831f47afe8f251daee503c8caa32.zip
Convert ret to return
Diffstat (limited to 'src/libcore/uint-template')
-rw-r--r--src/libcore/uint-template/u8.rs2
-rw-r--r--src/libcore/uint-template/uint.rs18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/uint-template/u8.rs b/src/libcore/uint-template/u8.rs
index bc73536c4a4..96b2dd6d9c3 100644
--- a/src/libcore/uint-template/u8.rs
+++ b/src/libcore/uint-template/u8.rs
@@ -3,4 +3,4 @@ type T = u8;
 // Type-specific functions here. These must be reexported by the
 // parent module so that they appear in core::u8 and not core::u8::u8;
 
-pure fn is_ascii(x: T) -> bool { ret 0 as T == x & 128 as T; }
+pure fn is_ascii(x: T) -> bool { return 0 as T == x & 128 as T; }
diff --git a/src/libcore/uint-template/uint.rs b/src/libcore/uint-template/uint.rs
index 10d91d73e75..401cb8c04c4 100644
--- a/src/libcore/uint-template/uint.rs
+++ b/src/libcore/uint-template/uint.rs
@@ -14,8 +14,8 @@ type T = uint;
  */
 pure fn div_ceil(x: uint, y: uint) -> uint {
     let div = div(x, y);
-    if x % y == 0u { ret div;}
-    else { ret div + 1u; }
+    if x % y == 0u { return div;}
+    else { return div + 1u; }
 }
 
 /**
@@ -32,8 +32,8 @@ pure fn div_ceil(x: uint, y: uint) -> uint {
  */
 pure fn div_round(x: uint, y: uint) -> uint {
     let div = div(x, y);
-    if x % y * 2u  < y { ret div;}
-    else { ret div + 1u; }
+    if x % y * 2u  < y { return div;}
+    else { return div + 1u; }
 }
 
 /**
@@ -51,10 +51,10 @@ pure fn div_round(x: uint, y: uint) -> uint {
  * The smallest integer `q` such that `x/y <= q`. This
  * is either `x/y` or `x/y + 1`.
  */
-pure fn div_floor(x: uint, y: uint) -> uint { ret x / y; }
+pure fn div_floor(x: uint, y: uint) -> uint { return x / y; }
 
 /// Produce a uint suitable for use in a hash table
-pure fn hash(&&x: uint) -> uint { ret x; }
+pure fn hash(&&x: uint) -> uint { return x; }
 
 /**
  * Iterate over the range [`lo`..`hi`), or stop when requested
@@ -74,10 +74,10 @@ pure fn hash(&&x: uint) -> uint { ret x; }
 pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
     let mut i = lo;
     while i < hi {
-        if (!it(i)) { ret false; }
+        if (!it(i)) { return false; }
         i += 1u;
     }
-    ret true;
+    return true;
 }
 
 /// Returns the smallest power of 2 greater than or equal to `n`
@@ -87,7 +87,7 @@ fn next_power_of_two(n: uint) -> uint {
     let mut tmp: uint = n - 1u;
     let mut shift: uint = 1u;
     while shift <= halfbits { tmp |= tmp >> shift; shift <<= 1u; }
-    ret tmp + 1u;
+    return tmp + 1u;
 }
 
 #[test]