container: remove internal iterators from Map

the maps are being migrated to external iterators
This commit is contained in:
Daniel Micay 2013-06-24 17:45:00 -04:00
parent 5242e8d2ba
commit 64ee9668a2
6 changed files with 104 additions and 137 deletions

View file

@ -61,29 +61,8 @@ impl<T> Mutable for cat<T> {
}
impl<T> Map<int, T> for cat<T> {
fn each<'a>(&'a self, f: &fn(&int, &'a T) -> bool) -> bool {
let mut n = int::abs(self.meows);
while n > 0 {
if !f(&n, &self.name) { return false; }
n -= 1;
}
return true;
}
fn contains_key(&self, k: &int) -> bool { *k <= self.meows }
fn each_key(&self, f: &fn(v: &int) -> bool) -> bool {
self.each(|k, _| f(k))
}
fn each_value<'a>(&'a self, f: &fn(v: &'a T) -> bool) -> bool {
self.each(|_, v| f(v))
}
fn mutate_values(&mut self, _f: &fn(&int, &mut T) -> bool) -> bool {
fail!("nope")
}
fn insert(&mut self, k: int, _: T) -> bool {
self.meows += k;
true