Slight Rust update.
This commit is contained in:
parent
deb7daf170
commit
81698f24f9
12
src/lib.rs
12
src/lib.rs
|
@ -428,8 +428,8 @@ impl Iterator for IntoIter {
|
||||||
fn bench_insertion(b: &mut ::test::Bencher) {
|
fn bench_insertion(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let mut data = AnyMap::new();
|
let mut data = AnyMap::new();
|
||||||
for _ in range(0, 100) {
|
for _ in 0..100 {
|
||||||
let _ = data.insert(42i32);
|
let _ = data.insert(42);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -438,7 +438,7 @@ fn bench_insertion(b: &mut ::test::Bencher) {
|
||||||
fn bench_get_missing(b: &mut ::test::Bencher) {
|
fn bench_get_missing(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let data = AnyMap::new();
|
let data = AnyMap::new();
|
||||||
for _ in range(0, 100) {
|
for _ in 0..100 {
|
||||||
assert_eq!(data.get(), None::<&i32>);
|
assert_eq!(data.get(), None::<&i32>);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -448,10 +448,10 @@ fn bench_get_missing(b: &mut ::test::Bencher) {
|
||||||
fn bench_get_present(b: &mut ::test::Bencher) {
|
fn bench_get_present(b: &mut ::test::Bencher) {
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let mut data = AnyMap::new();
|
let mut data = AnyMap::new();
|
||||||
let _ = data.insert(42i32);
|
let _ = data.insert(42);
|
||||||
// These inner loops are a feeble attempt to drown the other factors.
|
// These inner loops are a feeble attempt to drown the other factors.
|
||||||
for _ in range(0, 100) {
|
for _ in 0..100 {
|
||||||
assert_eq!(data.get(), Some(&42i32));
|
assert_eq!(data.get(), Some(&42));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue