about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-02-01 16:49:36 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-02-01 16:49:57 -0800
commit49cb3fc7dfd2a8ee7f35aaa884da8f710cd4a94a (patch)
treec42edd27f47c8a78cc212391c093992d3bde7f4b /src/libcore
parent4eb92d41775e633fbc177b1dd163a799260835a8 (diff)
downloadrust-49cb3fc7dfd2a8ee7f35aaa884da8f710cd4a94a.tar.gz
rust-49cb3fc7dfd2a8ee7f35aaa884da8f710cd4a94a.zip
Remove remaining references to option::t outside option itself
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/char.rs2
-rw-r--r--src/libcore/extfmt.rs6
-rw-r--r--src/libcore/task.rs2
-rw-r--r--src/libcore/vec.rs14
4 files changed, 12 insertions, 12 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs
index 3d7fa5ec3e8..21028655626 100644
--- a/src/libcore/char.rs
+++ b/src/libcore/char.rs
@@ -103,7 +103,7 @@ pure fn to_digit(c: char) -> u8 unsafe {
   brief = "Convert a char to the corresponding digit. Returns none when \
            character is not a valid hexadecimal digit."
 )]
-pure fn maybe_digit(c: char) -> option::t<u8> {
+pure fn maybe_digit(c: char) -> option<u8> {
     alt c {
       '0' to '9' { option::some(c as u8 - ('0' as u8)) }
       'a' to 'z' { option::some(c as u8 + 10u8 - ('a' as u8)) }
diff --git a/src/libcore/extfmt.rs b/src/libcore/extfmt.rs
index eb91c2cb5d5..3f58548684c 100644
--- a/src/libcore/extfmt.rs
+++ b/src/libcore/extfmt.rs
@@ -69,7 +69,7 @@ mod ct {
 
     // A formatted conversion from an expression to a string
     type conv =
-        {param: option::t<int>,
+        {param: option<int>,
          flags: [flag],
          width: count,
          precision: count,
@@ -115,7 +115,7 @@ mod ct {
         ret pieces;
     }
     fn peek_num(s: str, i: uint, lim: uint) ->
-       option::t<{num: uint, next: uint}> {
+       option<{num: uint, next: uint}> {
         if i >= lim { ret none; }
         let c = s[i];
         if !('0' as u8 <= c && c <= '9' as u8) { ret option::none; }
@@ -145,7 +145,7 @@ mod ct {
              next: ty.next};
     }
     fn parse_parameter(s: str, i: uint, lim: uint) ->
-       {param: option::t<int>, next: uint} {
+       {param: option<int>, next: uint} {
         if i >= lim { ret {param: none, next: i}; }
         let num = peek_num(s, i, lim);
         ret alt num {
diff --git a/src/libcore/task.rs b/src/libcore/task.rs
index 9bdc9fb006d..3b422c994e8 100644
--- a/src/libcore/task.rs
+++ b/src/libcore/task.rs
@@ -122,7 +122,7 @@ fn spawn(+f: fn~()) -> task {
 }
 
 fn spawn_inner(-f: fn~(),
-            notify: option::t<comm::chan<task_notification>>) -> task unsafe {
+            notify: option<comm::chan<task_notification>>) -> task unsafe {
     let closure: *rust_closure = unsafe::reinterpret_cast(ptr::addr_of(f));
     #debug("spawn: closure={%x,%x}", (*closure).fnptr, (*closure).envptr);
     let id = rustrt::new_task();
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index 6275f715937..bb88ad3c561 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -230,7 +230,7 @@ Returns:
 An option containing the last element of `v` if `v` is not empty, or
 none if `v` is empty.
 */
-pure fn last<T: copy>(v: [const T]) -> option::t<T> {
+pure fn last<T: copy>(v: [const T]) -> option<T> {
     if len(v) == 0u { ret none; }
     ret some(v[len(v) - 1u]);
 }
@@ -445,7 +445,7 @@ Apply a function to each element of a vector and return the results
 If function `f` returns `none` then that element is excluded from
 the resulting vector.
 */
-fn filter_map<T: copy, U: copy>(v: [const T], f: fn(T) -> option::t<U>)
+fn filter_map<T: copy, U: copy>(v: [const T], f: fn(T) -> option<U>)
     -> [U] {
     let result = [];
     for elem: T in v {
@@ -599,7 +599,7 @@ Apply function `f` to each element of `v`, starting from the first.
 When function `f` returns true then an option containing the element
 is returned. If `f` matches no elements then none is returned.
 */
-fn find<T: copy>(v: [T], f: fn(T) -> bool) -> option::t<T> {
+fn find<T: copy>(v: [T], f: fn(T) -> bool) -> option<T> {
     for elt: T in v { if f(elt) { ret some(elt); } }
     ret none;
 }
@@ -614,7 +614,7 @@ Returns:
 option::some(uint) - The first index containing a matching value
 option::none - No elements matched
 */
-fn position<T>(x: T, v: [T]) -> option::t<uint> {
+fn position<T>(x: T, v: [T]) -> option<uint> {
     let i: uint = 0u;
     while i < len(v) { if x == v[i] { ret some::<uint>(i); } i += 1u; }
     ret none;
@@ -625,7 +625,7 @@ Function: position_pred
 
 Find the first index for which the value matches some predicate
 */
-fn position_pred<T>(v: [T], f: fn(T) -> bool) -> option::t<uint> {
+fn position_pred<T>(v: [T], f: fn(T) -> bool) -> option<uint> {
     let i: uint = 0u;
     while i < len(v) { if f(v[i]) { ret some::<uint>(i); } i += 1u; }
     ret none;
@@ -1010,7 +1010,7 @@ mod tests {
 
     pure fn is_equal(&&x: uint, &&y:uint) -> bool { ret x == y; }
 
-    fn square_if_odd(&&n: uint) -> option::t<uint> {
+    fn square_if_odd(&&n: uint) -> option<uint> {
         ret if n % 2u == 1u { some(n * n) } else { none };
     }
 
@@ -1267,7 +1267,7 @@ mod tests {
         assert (w[1] == 9u);
         assert (w[2] == 25u);
 
-        fn halve(&&i: int) -> option::t<int> {
+        fn halve(&&i: int) -> option<int> {
             if i % 2 == 0 {
                 ret option::some::<int>(i / 2);
             } else { ret option::none::<int>; }