Fix test breakage

This commit is contained in:
Brian Anderson 2012-11-25 16:10:37 -08:00
parent 3acf4a2a9c
commit 3ac90ec9f8
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ fn find(mm: HashMap<~[u8], uint>, key: ~str) -> uint {
// given a map, increment the counter for a key
fn update_freq(mm: HashMap<~[u8], uint>, key: &[u8]) {
let key = vec::slice(key, 0, key.len());
mm.insert_with(key, 1, |v,v1| { v+v1 });
mm.update(key, 1, |v,v1| { v+v1 });
}
// given a ~[u8], for each window call a function

View File

@ -66,7 +66,7 @@ fn find(mm: HashMap<~[u8], uint>, key: ~str) -> uint {
// given a map, increment the counter for a key
fn update_freq(mm: HashMap<~[u8], uint>, key: &[u8]) {
let key = vec::slice(key, 0, key.len());
mm.insert_with(key, 1, |v,v1| { v+v1 });
mm.update(key, 1, |v,v1| { v+v1 });
}
// given a ~[u8], for each window call a function