about summary refs log tree commit diff
path: root/src/libcore/send_map.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/send_map.rs
parentc9d27693796fe4ced8568e11aa465750f743097b (diff)
Switch alts to use arrows
Diffstat (limited to 'src/libcore/send_map.rs')
-rw-r--r--src/libcore/send_map.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libcore/send_map.rs b/src/libcore/send_map.rs
index f2976e67eeb..a242587a21c 100644
--- a/src/libcore/send_map.rs
+++ b/src/libcore/send_map.rs
@@ -116,14 +116,10 @@ mod linear {
 
             let _ = for self.bucket_sequence(hash) |i| {
                 alt buckets[i] {
-                  some(bkt) {
-                    if bkt.hash == hash && self.eqfn(k, &bkt.key) {
-                        return found_entry(i);
-                    }
-                  }
-                  none => {
-                    return found_hole(i);
+                  some(bkt) => if bkt.hash == hash && self.eqfn(k, &bkt.key) {
+                    return found_entry(i);
                   }
+                  none => return found_hole(i)
                 }
             };
             return table_full;
@@ -162,7 +158,7 @@ mod linear {
             alt self.bucket_for_key_with_hash(self.buckets, hash,
                                               unsafe{borrow(k)}) {
               table_full => {fail ~"Internal logic error";}
-              found_hole(idx) {
+              found_hole(idx) => {
                 debug!{"insert fresh (%?->%?) at idx %?, hash %?",
                        k, v, idx, hash};
                 self.buckets[idx] = some({hash: hash, key: k, value: v});