auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism
This commit is contained in:
commit
d6442e97a5
49 changed files with 188 additions and 201 deletions
|
|
@ -49,7 +49,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
|
|||
let mut pairs = ~[];
|
||||
|
||||
// map -> [(k,%)]
|
||||
for mm.each_ref |&key, &val| {
|
||||
for mm.each |&key, &val| {
|
||||
pairs.push((key, pct(val, total)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ fn writer(path: ~str, pport: pipes::Port<Line>, size: uint)
|
|||
done += 1_u;
|
||||
let mut prev = done;
|
||||
while prev <= i {
|
||||
if lines.contains_key_ref(&prev) {
|
||||
if lines.contains_key(&prev) {
|
||||
debug!("WS %u", prev);
|
||||
cout.write(lines.get(&prev));
|
||||
done += 1_u;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue