diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-26 15:46:12 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-29 07:47:37 -0500 |
| commit | 7d661af9c86566088f7dbaeee25143ecde673b75 (patch) | |
| tree | 54aa9b410d06064bdc893f034e1b86921698aea9 /src/test/bench/std-smallintmap.rs | |
| parent | c300d681bd2e901ef39591bbfb1ea4568ac6be70 (diff) | |
| download | rust-7d661af9c86566088f7dbaeee25143ecde673b75.tar.gz rust-7d661af9c86566088f7dbaeee25143ecde673b75.zip | |
`for x in range(a, b)` -> `for x in a..b`
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
Diffstat (limited to 'src/test/bench/std-smallintmap.rs')
| -rw-r--r-- | src/test/bench/std-smallintmap.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/bench/std-smallintmap.rs b/src/test/bench/std-smallintmap.rs index c200c089bf4..562b82a92a3 100644 --- a/src/test/bench/std-smallintmap.rs +++ b/src/test/bench/std-smallintmap.rs @@ -15,13 +15,13 @@ use std::os; use std::time::Duration; fn append_sequential(min: uint, max: uint, map: &mut VecMap<uint>) { - for i in range(min, max) { + for i in min..max { map.insert(i, i + 22u); } } fn check_sequential(min: uint, max: uint, map: &VecMap<uint>) { - for i in range(min, max) { + for i in min..max { assert_eq!(map[i], i + 22u); } } @@ -41,7 +41,7 @@ fn main() { let mut checkf = Duration::seconds(0); let mut appendf = Duration::seconds(0); - for _ in range(0u, rep) { + for _ in 0u..rep { let mut map = VecMap::new(); let d1 = Duration::span(|| append_sequential(0u, max, &mut map)); let d2 = Duration::span(|| check_sequential(0u, max, &map)); |
