add the mutate_values method to the Map trait
This commit is contained in:
parent
4d8ddff52a
commit
becad9bb07
6 changed files with 61 additions and 12 deletions
|
|
@ -81,6 +81,10 @@ impl<T> Map<int, T> for cat<T> {
|
|||
for self.each |&(_, v)| { if !f(v) { break; } loop;};
|
||||
}
|
||||
|
||||
fn mutate_values(&mut self, f: &fn(&int, &mut T) -> bool) {
|
||||
fail!(~"nope")
|
||||
}
|
||||
|
||||
fn insert(&mut self, k: int, _: T) -> bool {
|
||||
self.meows += k;
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue