From 5606fc0c90461db40faeca16d7bffd9e61c2be73 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 6 Apr 2013 11:22:36 -0400 Subject: 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. --- src/libstd/workcache.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/workcache.rs') 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 Encodable 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; } -- cgit 1.4.1-3-g733a5