about summary refs log tree commit diff
path: root/src/libcore/vec.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-03 19:59:04 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-05 22:08:09 -0700
commit025d86624de982cdab7e6b13600fec1499c02b56 (patch)
tree96ba196f8a420c52e6034acd14f323d3d2239e29 /src/libcore/vec.rs
parentc9d27693796fe4ced8568e11aa465750f743097b (diff)
downloadrust-025d86624de982cdab7e6b13600fec1499c02b56.tar.gz
rust-025d86624de982cdab7e6b13600fec1499c02b56.zip
Switch alts to use arrows
Diffstat (limited to 'src/libcore/vec.rs')
-rw-r--r--src/libcore/vec.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/vec.rs b/src/libcore/vec.rs
index 2606bdf72f8..93bdd53d90d 100644
--- a/src/libcore/vec.rs
+++ b/src/libcore/vec.rs
@@ -357,8 +357,8 @@ fn split<T: copy>(v: &[T], f: fn(T) -> bool) -> ~[~[T]] {
     let mut result = ~[];
     while start < ln {
         alt position_between(v, start, ln, f) {
-          none { break }
-          some(i) {
+          none => break,
+          some(i) => {
             push(result, slice(v, start, i));
             start = i + 1u;
           }
@@ -381,8 +381,8 @@ fn splitn<T: copy>(v: &[T], n: uint, f: fn(T) -> bool) -> ~[~[T]] {
     let mut result = ~[];
     while start < ln && count > 0u {
         alt position_between(v, start, ln, f) {
-          none { break }
-          some(i) {
+          none => break,
+          some(i) => {
             push(result, slice(v, start, i));
             // Make sure to skip the separator.
             start = i + 1u;
@@ -406,8 +406,8 @@ fn rsplit<T: copy>(v: &[T], f: fn(T) -> bool) -> ~[~[T]] {
     let mut result = ~[];
     while end > 0u {
         alt rposition_between(v, 0u, end, f) {
-          none { break }
-          some(i) {
+          none => break,
+          some(i) => {
             push(result, slice(v, i + 1u, end));
             end = i;
           }
@@ -430,8 +430,8 @@ fn rsplitn<T: copy>(v: &[T], n: uint, f: fn(T) -> bool) -> ~[~[T]] {
     let mut result = ~[];
     while end > 0u && count > 0u {
         alt rposition_between(v, 0u, end, f) {
-          none { break }
-          some(i) {
+          none => break,
+          some(i) => {
             push(result, slice(v, i + 1u, end));
             // Make sure to skip the separator.
             end = i;
@@ -714,8 +714,8 @@ pure fn filter_map<T, U: copy>(v: &[T], f: fn(T) -> option<U>)
     let mut result = ~[];
     for each(v) |elem| {
         alt f(elem) {
-          none {/* no-op */ }
-          some(result_elem) { unsafe { push(result, result_elem); } }
+          none => {/* no-op */ }
+          some(result_elem) => unsafe { push(result, result_elem); }
         }
     }
     return result;