about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-02-02 13:19:40 -0500
committerDaniel Micay <danielmicay@gmail.com>2013-02-03 15:55:10 -0500
commit88d9d417a1ee3f3379a95583c90a78fd7e7cb2d2 (patch)
tree4811542a9c4685bd9925c4c6b6d3f0659a3a32de
parent643479f2e54913a6e16449742bdf023f6a753380 (diff)
oldmap: remove the legacy each_value method
-rw-r--r--src/libcargo/cargo.rc6
-rw-r--r--src/librustc/metadata/cstore.rs2
-rw-r--r--src/librustc/middle/trans/_match.rs6
-rw-r--r--src/libstd/oldmap.rs4
4 files changed, 7 insertions, 11 deletions
diff --git a/src/libcargo/cargo.rc b/src/libcargo/cargo.rc
index 2dd0192b72c..93a4d3dc2bf 100644
--- a/src/libcargo/cargo.rc
+++ b/src/libcargo/cargo.rc
@@ -748,7 +748,7 @@ pub fn configure(opts: Options) -> Cargo {
 }
 
 pub fn for_each_package(c: &Cargo, b: fn(s: @Source, p: &Package)) {
-    for c.sources.each_value |v| {
+    for c.sources.each_value_ref |&v| {
         for v.packages.each |p| {
             b(v, p);
         }
@@ -1569,7 +1569,7 @@ pub fn cmd_list(c: &Cargo) {
             }
         }
     } else {
-        for c.sources.each_value |v| {
+        for c.sources.each_value_ref |&v| {
             print_source(v);
         }
     }
@@ -1675,7 +1675,7 @@ pub fn copy_warn(srcfile: &Path, destfile: &Path) {
 
 pub fn cmd_sources(c: &Cargo) {
     if vec::len(c.opts.free) < 3u {
-        for c.sources.each_value |v| {
+        for c.sources.each_value_ref |&v| {
             info(fmt!("%s (%s) via %s",
                       v.name, v.url, v.method));
         }
diff --git a/src/librustc/metadata/cstore.rs b/src/librustc/metadata/cstore.rs
index 6397eed2d72..541ea0e40f5 100644
--- a/src/librustc/metadata/cstore.rs
+++ b/src/librustc/metadata/cstore.rs
@@ -148,7 +148,7 @@ pub fn get_dep_hashes(cstore: CStore) -> ~[~str] {
     type crate_hash = {name: ~str, hash: ~str};
     let mut result = ~[];
 
-    for p(cstore).use_crate_map.each_value |cnum| {
+    for p(cstore).use_crate_map.each_value_ref |&cnum| {
         let cdata = cstore::get_crate_data(cstore, cnum);
         let hash = decoder::get_crate_hash(cdata.data);
         debug!("Add hash[%s]: %s", cdata.name, hash);
diff --git a/src/librustc/middle/trans/_match.rs b/src/librustc/middle/trans/_match.rs
index 4a1225efe52..3b168b1d5f7 100644
--- a/src/librustc/middle/trans/_match.rs
+++ b/src/librustc/middle/trans/_match.rs
@@ -1085,7 +1085,7 @@ pub fn store_non_ref_bindings(bcx: block,
      */
 
     let mut bcx = bcx;
-    for data.bindings_map.each_value |binding_info| {
+    for data.bindings_map.each_value_ref |&binding_info| {
         match binding_info.trmode {
             TrByValue(is_move, lldest) => {
                 let llval = Load(bcx, binding_info.llmatch); // get a T*
@@ -1119,7 +1119,7 @@ pub fn insert_lllocals(bcx: block,
      * the `fcx.lllocals` map.  If add_cleans is true, then adds cleanups for
      * the bindings. */
 
-    for data.bindings_map.each_value |binding_info| {
+    for data.bindings_map.each_value_ref |&binding_info| {
         let llval = match binding_info.trmode {
             // By value bindings: use the stack slot that we
             // copied/moved the value into
@@ -1191,7 +1191,7 @@ pub fn compile_guard(bcx: block,
 
     fn drop_bindings(bcx: block, data: &ArmData) -> block {
         let mut bcx = bcx;
-        for data.bindings_map.each_value |binding_info| {
+        for data.bindings_map.each_value_ref |&binding_info| {
             match binding_info.trmode {
                 TrByValue(_, llval) => {
                     bcx = glue::drop_ty(bcx, llval, binding_info.ty);
diff --git a/src/libstd/oldmap.rs b/src/libstd/oldmap.rs
index 3c098c3db6d..2ca3ca9346e 100644
--- a/src/libstd/oldmap.rs
+++ b/src/libstd/oldmap.rs
@@ -324,10 +324,6 @@ pub mod chained {
             self.each_key_ref(|p| blk(*p))
         }
 
-        pure fn each_value(blk: fn(value: V) -> bool) {
-            self.each_value_ref(|p| blk(*p))
-        }
-
         pure fn each_ref(blk: fn(key: &K, value: &V) -> bool) {
             for self.each_entry |entry| {
                 if !blk(&entry.key, &entry.value) { break; }