about summary refs log tree commit diff
path: root/src/libstd/workcache.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2013-04-06 11:22:36 -0400
committerNiko Matsakis <niko@alum.mit.edu>2013-04-10 07:51:48 -0700
commit5606fc0c90461db40faeca16d7bffd9e61c2be73 (patch)
tree771bcf433e2c582d97ae276d6927aea08f7ed755 /src/libstd/workcache.rs
parent72228012343db793ff453b7cf038d973ccac61a7 (diff)
downloadrust-5606fc0c90461db40faeca16d7bffd9e61c2be73.tar.gz
rust-5606fc0c90461db40faeca16d7bffd9e61c2be73.zip
Revert map.each to something which takes two parameters
rather than a tuple.  The current setup iterates over
`BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared
*in the each method*.  You can't place such a type in
the impl declaration.  The compiler currently allows it,
but this will not be legal under #5656 and I'm pretty sure
it's not sound now.
Diffstat (limited to 'src/libstd/workcache.rs')
-rw-r--r--src/libstd/workcache.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/workcache.rs b/src/libstd/workcache.rs
index 3e494d0236e..c4b450810aa 100644
--- a/src/libstd/workcache.rs
+++ b/src/libstd/workcache.rs
@@ -145,7 +145,7 @@ impl WorkMap {
 impl<S:Encoder> Encodable<S> for WorkMap {
     fn encode(&self, s: &S) {
         let mut d = ~[];
-        for self.each |&(k, v)| {
+        for self.each |k, v| {
             d.push((copy *k, copy *v))
         }
         sort::tim_sort(d);
@@ -319,7 +319,7 @@ impl TPrep for Prep {
     }
 
     fn all_fresh(&self, cat: &str, map: &WorkMap) -> bool {
-        for map.each |&(k, v)| {
+        for map.each |k, v| {
             if ! self.is_fresh(cat, k.kind, k.name, *v) {
                 return false;
             }