Un-broke benchmarks

This commit is contained in:
Steven Fackler 2013-07-13 20:30:05 -07:00
parent 6b37b5bab7
commit 0e882f2bbd
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ fn timed(label: &str, f: &fn()) {
io::println(fmt!(" %s: %f", label, end - start));
}
fn ascending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
fn ascending<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint) {
io::println(" Ascending integers:");
do timed("insert") {
@ -49,7 +49,7 @@ fn ascending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
}
}
fn descending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
fn descending<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint) {
io::println(" Descending integers:");
do timed("insert") {
@ -71,7 +71,7 @@ fn descending<M: Map<uint, uint>>(map: &mut M, n_keys: uint) {
}
}
fn vector<M: Map<uint, uint>>(map: &mut M, n_keys: uint, dist: &[uint]) {
fn vector<M: MutableMap<uint, uint>>(map: &mut M, n_keys: uint, dist: &[uint]) {
do timed("insert") {
for uint::range(0, n_keys) |i| {

View File

@ -36,7 +36,7 @@ fn timed(result: &mut float, op: &fn()) {
}
impl Results {
pub fn bench_int<T:Set<uint>,
pub fn bench_int<T:MutableSet<uint>,
R: rand::Rng>(
&mut self,
rng: &mut R,
@ -79,7 +79,7 @@ impl Results {
}
}
pub fn bench_str<T:Set<~str>,
pub fn bench_str<T:MutableSet<~str>,
R:rand::Rng>(
&mut self,
rng: &mut R,