about summary refs log tree commit diff
path: root/src/libstd/smallintmap.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 12:34:08 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-06 15:36:30 -0700
commitecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch)
tree775f69be65adff65551d96173dd797e32e2c3157 /src/libstd/smallintmap.rs
parentd3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff)
downloadrust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.tar.gz
rust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.zip
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libstd/smallintmap.rs')
-rw-r--r--src/libstd/smallintmap.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs
index 2fe09f75d56..6ed2a397b3f 100644
--- a/src/libstd/smallintmap.rs
+++ b/src/libstd/smallintmap.rs
@@ -48,7 +48,7 @@ pure fn find<T: copy>(self: smallintmap<T>, key: uint) -> option<T> {
  * If the key does not exist in the map
  */
 pure fn get<T: copy>(self: smallintmap<T>, key: uint) -> T {
-    alt find(self, key) {
+    match find(self, key) {
       none => {
         error!{"smallintmap::get(): key not present"};
         fail;
@@ -67,7 +67,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn size() -> uint {
         let mut sz = 0u;
         for self.v.each |item| {
-            alt item {
+            match item {
               some(_) => sz += 1u,
               _ => ()
             }
@@ -103,7 +103,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn each(it: fn(+key: uint, +value: V) -> bool) {
         let mut idx = 0u, l = self.v.len();
         while idx < l {
-            alt self.v.get_elt(idx) {
+            match self.v.get_elt(idx) {
               some(elt) => if !it(idx, elt) { break }
               none => ()
             }
@@ -119,7 +119,7 @@ impl <V: copy> of map::map<uint, V> for smallintmap<V> {
     fn each_ref(it: fn(key: &uint, value: &V) -> bool) {
         let mut idx = 0u, l = self.v.len();
         while idx < l {
-            alt self.v.get_elt(idx) {
+            match self.v.get_elt(idx) {
               some(elt) => if !it(&idx, &elt) { break }
               none => ()
             }