about summary refs log tree commit diff
path: root/src/test/bench
diff options
context:
space:
mode:
authorSimon BD <simon@server>2012-10-03 21:47:09 -0500
committerSimon BD <simon@server>2012-10-03 21:47:09 -0500
commitefcd2385ea2389f270ff8ac8bc256636f647b130 (patch)
tree7e142ef709bc907a34ab1cb252eef6dcc0e83b91 /src/test/bench
parent44f8a4401ab37a45ba49db56611d77807bcbce35 (diff)
parent3ccf6f5932d8223fd6c5cbf7c6ac429ca9e8912a (diff)
downloadrust-efcd2385ea2389f270ff8ac8bc256636f647b130.tar.gz
rust-efcd2385ea2389f270ff8ac8bc256636f647b130.zip
Merge remote-tracking branch 'original/incoming' into incoming
Conflicts:
	src/libstd/json.rs
	src/libstd/sort.rs
Diffstat (limited to 'src/test/bench')
-rw-r--r--src/test/bench/core-map.rs4
-rw-r--r--src/test/bench/core-std.rs10
-rw-r--r--src/test/bench/core-vec-append.rs2
-rw-r--r--src/test/bench/graph500-bfs.rs36
-rw-r--r--src/test/bench/msgsend-pipes-shared.rs4
-rw-r--r--src/test/bench/msgsend-pipes.rs4
-rw-r--r--src/test/bench/msgsend-ring-mutex-arcs.rs6
-rw-r--r--src/test/bench/msgsend-ring-pipes.rs4
-rw-r--r--src/test/bench/msgsend-ring-rw-arcs.rs6
-rw-r--r--src/test/bench/msgsend-ring.rs2
-rw-r--r--src/test/bench/msgsend.rs2
-rw-r--r--src/test/bench/pingpong.rs2
-rw-r--r--src/test/bench/shootout-chameneos-redux.rs2
-rw-r--r--src/test/bench/shootout-fasta.rs2
-rw-r--r--src/test/bench/shootout-k-nucleotide-pipes.rs6
-rw-r--r--src/test/bench/shootout-k-nucleotide.rs4
-rw-r--r--src/test/bench/shootout-mandelbrot.rs6
-rw-r--r--src/test/bench/shootout-pfib.rs2
-rw-r--r--src/test/bench/task-perf-one-million.rs2
-rw-r--r--src/test/bench/task-perf-word-count-generic.rs11
20 files changed, 58 insertions, 59 deletions
diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs
index 279905fe3f1..afd9b2ccc9c 100644
--- a/src/test/bench/core-map.rs
+++ b/src/test/bench/core-map.rs
@@ -154,7 +154,7 @@ fn main(++args: ~[~str]) {
     let seed = ~[1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
 
     {
-        let rng = rand::seeded_rng(copy seed);
+        let rng = rand::seeded_rng(&seed);
         let mut results = empty_results();
         int_benchmarks::<map::HashMap<uint, uint>>(
             map::HashMap, rng, num_keys, &mut results);
@@ -164,7 +164,7 @@ fn main(++args: ~[~str]) {
     }
 
     {
-        let rng = rand::seeded_rng(copy seed);
+        let rng = rand::seeded_rng(&seed);
         let mut results = empty_results();
         int_benchmarks::<@Mut<LinearMap<uint, uint>>>(
             || @Mut(LinearMap()),
diff --git a/src/test/bench/core-std.rs b/src/test/bench/core-std.rs
index a88793705a6..cf44d478356 100644
--- a/src/test/bench/core-std.rs
+++ b/src/test/bench/core-std.rs
@@ -30,7 +30,7 @@ fn maybe_run_test(argv: &[~str], name: ~str, test: fn()) {
 
     if os::getenv(~"RUST_BENCH").is_some() { run_test = true }
     else if argv.len() > 0 {
-        run_test = argv.contains(~"all") || argv.contains(name)
+        run_test = argv.contains(&~"all") || argv.contains(&name)
     }
 
     if !run_test { return }
@@ -47,7 +47,7 @@ fn shift_push() {
     let mut v2 = ~[];
 
     while v1.len() > 0 {
-        vec::push(v2, vec::shift(v1));
+        v2.push(v1.shift());
     }
 }
 
@@ -56,7 +56,7 @@ fn read_line() {
         .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
 
     for int::range(0, 3) |_i| {
-        let reader = result::get(io::file_reader(&path));
+        let reader = result::get(&io::file_reader(&path));
         while !reader.eof() {
             reader.read_line();
         }
@@ -122,11 +122,11 @@ fn vec_push_all() {
     for uint::range(0, 1500) |i| {
         let mut rv = vec::from_elem(r.gen_uint_range(0, i + 1), i);
         if r.gen_bool() {
-            vec::push_all(v, rv);
+            v.push_all(rv);
         }
         else {
             v <-> rv;
-            vec::push_all(v, rv);
+            v.push_all(rv);
         }
     }
 }
diff --git a/src/test/bench/core-vec-append.rs b/src/test/bench/core-vec-append.rs
index d708ac9eaa7..2b9216876b4 100644
--- a/src/test/bench/core-vec-append.rs
+++ b/src/test/bench/core-vec-append.rs
@@ -7,7 +7,7 @@ use io::WriterUtil;
 fn collect_raw(num: uint) -> ~[uint] {
     let mut result = ~[];
     for uint::range(0u, num) |i| {
-        vec::push(result, i);
+        result.push(i);
     }
     return result;
 }
diff --git a/src/test/bench/graph500-bfs.rs b/src/test/bench/graph500-bfs.rs
index 89ca8eadde4..a34fcc89c04 100644
--- a/src/test/bench/graph500-bfs.rs
+++ b/src/test/bench/graph500-bfs.rs
@@ -97,7 +97,7 @@ fn gen_search_keys(graph: graph, n: uint) -> ~[node_id] {
         let k = r.gen_uint_range(0u, graph.len());
 
         if graph[k].len() > 0u && vec::any(graph[k], |i| {
-            i != k as node_id
+            *i != k as node_id
         }) {
             map::set_add(keys, k as node_id);
         }
@@ -160,8 +160,8 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
         }
     };
 
-    fn is_gray(c: color) -> bool {
-        match c {
+    fn is_gray(c: &color) -> bool {
+        match *c {
           gray(_) => { true }
           _ => { false }
         }
@@ -183,7 +183,7 @@ fn bfs2(graph: graph, key: node_id) -> bfs_result {
                 let mut color = white;
 
                 do neighbors.each() |k| {
-                    if is_gray(colors[*k]) {
+                    if is_gray(&colors[*k]) {
                         color = gray(*k);
                         false
                     }
@@ -231,18 +231,18 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
     };
 
     #[inline(always)]
-    fn is_gray(c: color) -> bool {
-        match c {
+    fn is_gray(c: &color) -> bool {
+        match *c {
           gray(_) => { true }
           _ => { false }
         }
     }
 
-    let mut i = 0u;
+    let mut i = 0;
     while par::any(colors, is_gray) {
         // Do the BFS.
         log(info, fmt!("PBFS iteration %?", i));
-        i += 1u;
+        i += 1;
         let old_len = colors.len();
 
         let color = arc::ARC(colors);
@@ -251,7 +251,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
         colors = do par::mapi_factory(*color_vec) {
             let colors = arc::clone(&color);
             let graph = arc::clone(&graph);
-            fn~(i: uint, c: color) -> color {
+            fn~(+i: uint, +c: color) -> color {
                 let c : color = c;
                 let colors = arc::get(&colors);
                 let graph = arc::get(&graph);
@@ -264,7 +264,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
                     let mut color = white;
 
                     do neighbors.each() |k| {
-                        if is_gray(colors[*k]) {
+                        if is_gray(&colors[*k]) {
                             color = gray(*k);
                             false
                         }
@@ -282,7 +282,7 @@ fn pbfs(&&graph: arc::ARC<graph>, key: node_id) -> bfs_result {
 
     // Convert the results.
     do par::map(colors) |c| {
-        match c {
+        match *c {
           white => { -1i64 }
           black(parent) => { parent }
           _ => { fail ~"Found remaining gray nodes in BFS" }
@@ -314,11 +314,11 @@ fn validate(edges: ~[(node_id, node_id)],
         }
         else {
             while parent != root {
-                if vec::contains(path, parent) {
+                if vec::contains(path, &parent) {
                     status = false;
                 }
 
-                vec::push(path, parent);
+                path.push(parent);
                 parent = tree[parent];
             }
 
@@ -336,8 +336,8 @@ fn validate(edges: ~[(node_id, node_id)],
     log(info, ~"Verifying tree edges...");
 
     let status = do tree.alli() |k, parent| {
-        if parent != root && parent != -1i64 {
-            level[parent] == level[k] - 1
+        if *parent != root && *parent != -1i64 {
+            level[*parent] == level[k] - 1
         }
         else {
             true
@@ -352,7 +352,7 @@ fn validate(edges: ~[(node_id, node_id)],
     log(info, ~"Verifying graph edges...");
 
     let status = do edges.all() |e| {
-        let (u, v) = e;
+        let (u, v) = *e;
 
         abs(level[u] - level[v]) <= 1
     };
@@ -370,11 +370,11 @@ fn validate(edges: ~[(node_id, node_id)],
 
     let status = do par::alli(tree) |u, v| {
         let u = u as node_id;
-        if v == -1i64 || u == root {
+        if *v == -1i64 || u == root {
             true
         }
         else {
-            edges.contains((u, v)) || edges.contains((v, u))
+            edges.contains(&(u, *v)) || edges.contains(&(*v, u))
         }
     };
 
diff --git a/src/test/bench/msgsend-pipes-shared.rs b/src/test/bench/msgsend-pipes-shared.rs
index 89d339b7a76..0a55e7572db 100644
--- a/src/test/bench/msgsend-pipes-shared.rs
+++ b/src/test/bench/msgsend-pipes-shared.rs
@@ -19,7 +19,7 @@ use io::WriterUtil;
 use pipes::{Port, Chan, SharedChan};
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
+    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); y } }
 )
 
 enum request {
@@ -60,7 +60,7 @@ fn run(args: &[~str]) {
     for uint::range(0u, workers) |i| {
         let to_child = to_child.clone();
         do task::task().future_result(|+r| {
-            vec::push(worker_results, r);
+            worker_results.push(r);
         }).spawn {
             for uint::range(0u, size / workers) |_i| {
                 //error!("worker %?: sending %? bytes", i, num_bytes);
diff --git a/src/test/bench/msgsend-pipes.rs b/src/test/bench/msgsend-pipes.rs
index babc97694a5..ab67a8c7cb1 100644
--- a/src/test/bench/msgsend-pipes.rs
+++ b/src/test/bench/msgsend-pipes.rs
@@ -15,7 +15,7 @@ use io::WriterUtil;
 use pipes::{Port, PortSet, Chan};
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
+    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); y } }
 )
 
 enum request {
@@ -57,7 +57,7 @@ fn run(args: &[~str]) {
         let (to_child, from_parent_) = pipes::stream();
         from_parent.add(from_parent_);
         do task::task().future_result(|+r| {
-            vec::push(worker_results, r);
+            worker_results.push(r);
         }).spawn {
             for uint::range(0u, size / workers) |_i| {
                 //error!("worker %?: sending %? bytes", i, num_bytes);
diff --git a/src/test/bench/msgsend-ring-mutex-arcs.rs b/src/test/bench/msgsend-ring-mutex-arcs.rs
index e3d8afce1bf..ec144b78a10 100644
--- a/src/test/bench/msgsend-ring-mutex-arcs.rs
+++ b/src/test/bench/msgsend-ring-mutex-arcs.rs
@@ -18,7 +18,7 @@ type pipe = arc::MutexARC<~[uint]>;
 
 fn send(p: &pipe, msg: uint) {
     do p.access_cond |state, cond| {
-        vec::push(*state, msg);
+        state.push(msg);
         cond.signal();
     }
 }
@@ -27,7 +27,7 @@ fn recv(p: &pipe) -> uint {
         while vec::is_empty(*state) {
             cond.wait();
         }
-        vec::pop(*state)
+        state.pop()
     }
 }
 
@@ -91,7 +91,7 @@ fn main(++args: ~[~str]) {
                         option::unwrap(num_chan),
                         option::unwrap(num_port1))
         });
-        vec::push(futures, new_future);
+        futures.push(new_future);
         num_chan = Some(new_chan);
     };
 
diff --git a/src/test/bench/msgsend-ring-pipes.rs b/src/test/bench/msgsend-ring-pipes.rs
index 645aa654700..119c2065d6b 100644
--- a/src/test/bench/msgsend-ring-pipes.rs
+++ b/src/test/bench/msgsend-ring-pipes.rs
@@ -24,7 +24,7 @@ proto! ring (
 fn macros() {
     #macro[
         [#move_out[x],
-         unsafe { let y <- *ptr::addr_of(x); y }]
+         unsafe { let y <- *ptr::addr_of(&x); y }]
     ];
 }
 
@@ -88,7 +88,7 @@ fn main(++args: ~[~str]) {
                         option::unwrap(num_chan),
                         option::unwrap(num_port1))
         };
-        vec::push(futures, new_future);
+        futures.push(new_future);
         num_chan = Some(new_chan);
     };
 
diff --git a/src/test/bench/msgsend-ring-rw-arcs.rs b/src/test/bench/msgsend-ring-rw-arcs.rs
index b4b75adc3b5..1b857b6caeb 100644
--- a/src/test/bench/msgsend-ring-rw-arcs.rs
+++ b/src/test/bench/msgsend-ring-rw-arcs.rs
@@ -18,7 +18,7 @@ type pipe = arc::RWARC<~[uint]>;
 
 fn send(p: &pipe, msg: uint) {
     do p.write_cond |state, cond| {
-        vec::push(*state, msg);
+        state.push(msg);
         cond.signal();
     }
 }
@@ -27,7 +27,7 @@ fn recv(p: &pipe) -> uint {
         while vec::is_empty(*state) {
             cond.wait();
         }
-        vec::pop(*state)
+        state.pop()
     }
 }
 
@@ -92,7 +92,7 @@ fn main(++args: ~[~str]) {
                         option::unwrap(num_chan),
                         option::unwrap(num_port1))
         };
-        vec::push(futures, new_future);
+        futures.push(new_future);
         num_chan = Some(new_chan);
     };
 
diff --git a/src/test/bench/msgsend-ring.rs b/src/test/bench/msgsend-ring.rs
index 47ce0d2b91f..5533aeeeb41 100644
--- a/src/test/bench/msgsend-ring.rs
+++ b/src/test/bench/msgsend-ring.rs
@@ -51,7 +51,7 @@ fn main(++args: ~[~str]) {
             get_chan_chan.send(Chan(p));
             thread_ring(i, msg_per_task, num_chan,  p)
         };
-        vec::push(futures, new_future);
+        futures.push(new_future);
         
         num_chan = get_chan.recv();
     };
diff --git a/src/test/bench/msgsend.rs b/src/test/bench/msgsend.rs
index 2790f00d40d..fb1e3ae9226 100644
--- a/src/test/bench/msgsend.rs
+++ b/src/test/bench/msgsend.rs
@@ -37,7 +37,7 @@ fn run(args: ~[~str]) {
     let mut worker_results = ~[];
     for uint::range(0u, workers) |_i| {
         do task::task().future_result(|+r| {
-            vec::push(worker_results, r);
+            worker_results.push(r);
         }).spawn {
             for uint::range(0u, size / workers) |_i| {
                 comm::send(to_child, bytes(100u));
diff --git a/src/test/bench/pingpong.rs b/src/test/bench/pingpong.rs
index 570ec8c0b6b..70f98934e1b 100644
--- a/src/test/bench/pingpong.rs
+++ b/src/test/bench/pingpong.rs
@@ -33,7 +33,7 @@ proto! pingpong_unbounded (
 
 // This stuff should go in libcore::pipes
 macro_rules! move_it (
-    { $x:expr } => { let t <- *ptr::addr_of($x); t }
+    { $x:expr } => { let t <- *ptr::addr_of(&($x)); t }
 )
 
 macro_rules! follow (
diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs
index bdfe4b7b727..5c7827f5106 100644
--- a/src/test/bench/shootout-chameneos-redux.rs
+++ b/src/test/bench/shootout-chameneos-redux.rs
@@ -163,7 +163,7 @@ fn rendezvous(nn: uint, set: ~[color]) {
     // save each creature's meeting stats
     let mut report = ~[];
     for vec::each(to_creature) |_to_one| {
-        vec::push(report, comm::recv(from_creatures_log));
+        report.push(comm::recv(from_creatures_log));
     }
 
     // print each color in the set
diff --git a/src/test/bench/shootout-fasta.rs b/src/test/bench/shootout-fasta.rs
index a07b29f3dc6..0c742e16bfa 100644
--- a/src/test/bench/shootout-fasta.rs
+++ b/src/test/bench/shootout-fasta.rs
@@ -81,7 +81,7 @@ fn main(++args: ~[~str]) {
     };
 
     let writer = if os::getenv(~"RUST_BENCH").is_some() {
-        result::get(io::file_writer(&Path("./shootout-fasta.data"),
+        result::get(&io::file_writer(&Path("./shootout-fasta.data"),
                                     ~[io::Truncate, io::Create]))
     } else {
         io::stdout()
diff --git a/src/test/bench/shootout-k-nucleotide-pipes.rs b/src/test/bench/shootout-k-nucleotide-pipes.rs
index 21bed9f8790..85dcdd32e13 100644
--- a/src/test/bench/shootout-k-nucleotide-pipes.rs
+++ b/src/test/bench/shootout-k-nucleotide-pipes.rs
@@ -41,7 +41,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
 
    // map -> [(k,%)]
    mm.each(fn&(key: ~[u8], val: uint) -> bool {
-      vec::push(pairs, (key, pct(val, total)));
+      pairs.push((key, pct(val, total)));
       return true;
    });
 
@@ -134,7 +134,7 @@ fn main(++args: ~[~str]) {
        // get to this massive data set, but #include_bin chokes on it (#2598)
        let path = Path(env!("CFG_SRC_DIR"))
            .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
-       result::get(io::file_reader(&path))
+       result::get(&io::file_reader(&path))
    } else {
       io::stdin()
    };
@@ -152,7 +152,7 @@ fn main(++args: ~[~str]) {
         stream <-> streams[ii];
         let (to_parent_, from_child_) = option::unwrap(stream);
 
-        vec::push(from_child, from_child_);
+        from_child.push(from_child_);
 
         let (to_child, from_parent) = pipes::stream();
 
diff --git a/src/test/bench/shootout-k-nucleotide.rs b/src/test/bench/shootout-k-nucleotide.rs
index d107db7e6b0..6ba6eb7fead 100644
--- a/src/test/bench/shootout-k-nucleotide.rs
+++ b/src/test/bench/shootout-k-nucleotide.rs
@@ -38,7 +38,7 @@ fn sort_and_fmt(mm: HashMap<~[u8], uint>, total: uint) -> ~str {
 
    // map -> [(k,%)]
    mm.each(fn&(key: ~[u8], val: uint) -> bool {
-      vec::push(pairs, (key, pct(val, total)));
+      pairs.push((key, pct(val, total)));
       return true;
    });
 
@@ -131,7 +131,7 @@ fn main(++args: ~[~str]) {
        // get to this massive data set, but #include_bin chokes on it (#2598)
        let path = Path(env!("CFG_SRC_DIR"))
            .push_rel(&Path("src/test/bench/shootout-k-nucleotide.data"));
-       result::get(io::file_reader(&path))
+       result::get(&io::file_reader(&path))
    } else {
       io::stdin()
    };
diff --git a/src/test/bench/shootout-mandelbrot.rs b/src/test/bench/shootout-mandelbrot.rs
index f6386a207b1..ee38b957b0c 100644
--- a/src/test/bench/shootout-mandelbrot.rs
+++ b/src/test/bench/shootout-mandelbrot.rs
@@ -85,7 +85,7 @@ fn chanmb(i: uint, size: uint, ch: comm::Chan<line>) -> ()
     let xincr = 8f64*incr;
     for uint::range(0_u, size/8_u) |j| {
         let x = cmplx {re: xincr*(j as f64) - 1.5f64, im: y};
-        vec::push(crv, fillbyte(x, incr));
+        crv.push(fillbyte(x, incr));
     };
     comm::send(ch, {i:i, b:crv});
 }
@@ -94,7 +94,7 @@ type devnull = {dn: int};
 
 impl devnull: io::Writer {
     fn write(_b: &[const u8]) {}
-    fn seek(_i: int, _s: io::SeekStyle) {}
+    fn seek(+_i: int, +_s: io::SeekStyle) {}
     fn tell() -> uint {0_u}
     fn flush() -> int {0}
     fn get_type() -> io::WriterType { io::File }
@@ -114,7 +114,7 @@ fn writer(path: ~str, writech: comm::Chan<comm::Chan<line>>, size: uint)
         }
         _ => {
             result::get(
-                io::file_writer(&Path(path),
+                &io::file_writer(&Path(path),
                 ~[io::Create, io::Truncate]))
         }
     };
diff --git a/src/test/bench/shootout-pfib.rs b/src/test/bench/shootout-pfib.rs
index 705679bd403..90224645f84 100644
--- a/src/test/bench/shootout-pfib.rs
+++ b/src/test/bench/shootout-pfib.rs
@@ -73,7 +73,7 @@ fn stress(num_tasks: int) {
     let mut results = ~[];
     for range(0, num_tasks) |i| {
         do task::task().future_result(|+r| {
-            vec::push(results, r);
+            results.push(r);
         }).spawn {
             stress_task(i);
         }
diff --git a/src/test/bench/task-perf-one-million.rs b/src/test/bench/task-perf-one-million.rs
index da8b1932f65..c9d4fb6b4d8 100644
--- a/src/test/bench/task-perf-one-million.rs
+++ b/src/test/bench/task-perf-one-million.rs
@@ -21,7 +21,7 @@ fn calc(children: uint, parent_ch: comm::Chan<msg>) {
     for iter::repeat (children) {
         match comm::recv(port) {
           ready(child_ch) => {
-            vec::push(child_chs, child_ch);
+            child_chs.push(child_ch);
           }
           _ => fail ~"task-perf-one-million failed (port not ready)"
         }
diff --git a/src/test/bench/task-perf-word-count-generic.rs b/src/test/bench/task-perf-word-count-generic.rs
index 73c5dab16d8..62612366524 100644
--- a/src/test/bench/task-perf-word-count-generic.rs
+++ b/src/test/bench/task-perf-word-count-generic.rs
@@ -20,7 +20,7 @@ use option::None;
 use std::map;
 use std::map::HashMap;
 use hash::Hash;
-use io::WriterUtil;
+use io::{ReaderUtil, WriterUtil};
 
 use std::time;
 
@@ -32,7 +32,7 @@ use cmp::Eq;
 use to_bytes::IterBytes;
 
 macro_rules! move_out (
-    { $x:expr } => { unsafe { let y <- *ptr::addr_of($x); y } }
+    { $x:expr } => { unsafe { let y <- *ptr::addr_of(&($x)); y } }
 )
 
 trait word_reader {
@@ -155,8 +155,8 @@ mod map_reduce {
             let (ctrl, ctrl_server) = ctrl_proto::init();
             let ctrl = box(ctrl);
             let i = copy *i;
-            vec::push(tasks, spawn_joinable(|move i| map_task(map, ctrl, i)));
-            vec::push(ctrls, ctrl_server);
+            tasks.push(spawn_joinable(|move i| map_task(map, ctrl, i)));
+            ctrls.push(ctrl_server);
         }
         return tasks;
     }
@@ -270,8 +270,7 @@ mod map_reduce {
                     let p = Port();
                     let ch = Chan(p);
                     let r = reduce, kk = k;
-                    vec::push(tasks,
-                              spawn_joinable(|| reduce_task(r, kk, ch) ));
+                    tasks.push(spawn_joinable(|| reduce_task(r, kk, ch) ));
                     c = recv(p);
                     reducers.insert(k, c);
                   }