Merge pull request #6 from tivek/patch-1

Fix int type inference in range calls
This commit is contained in:
Chris Morgan 2014-07-21 11:50:04 +10:00
commit a1dadf856e

View file

@ -164,7 +164,7 @@ impl Mutable for AnyMap {
fn bench_insertion(b: &mut ::test::Bencher) {
b.iter(|| {
let mut data = AnyMap::new();
for _ in range(0, 100) {
for _ in range(0u, 100) {
data.insert(42i);
}
})
@ -174,7 +174,7 @@ fn bench_insertion(b: &mut ::test::Bencher) {
fn bench_find_missing(b: &mut ::test::Bencher) {
b.iter(|| {
let data = AnyMap::new();
for _ in range(0, 100) {
for _ in range(0u, 100) {
assert_eq!(data.find(), None::<&int>);
}
})
@ -186,7 +186,7 @@ fn bench_find_present(b: &mut ::test::Bencher) {
let mut data = AnyMap::new();
data.insert(42i);
// These inner loops are a feeble attempt to drown the other factors.
for _ in range(0, 100) {
for _ in range(0u, 100) {
assert_eq!(data.find(), Some(&42i));
}
})