diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-26 15:44:22 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-29 07:46:44 -0500 |
| commit | c300d681bd2e901ef39591bbfb1ea4568ac6be70 (patch) | |
| tree | ee0b4b0a74846595b700d1b2375fd10309b63a22 /src/libstd/collections | |
| parent | bedd8108dc9b79402d1ea5349d766275f73398ff (diff) | |
| download | rust-c300d681bd2e901ef39591bbfb1ea4568ac6be70.tar.gz rust-c300d681bd2e901ef39591bbfb1ea4568ac6be70.zip | |
`range(a, b).foo()` -> `(a..b).foo()`
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
Diffstat (limited to 'src/libstd/collections')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 4 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index ae295c3e8e4..27e5295d2c8 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1775,11 +1775,11 @@ mod test_map { for _ in half {} DROP_VECTOR.with(|v| { - let nk = range(0u, 100).filter(|&i| { + let nk = (0u..100).filter(|&i| { v.borrow()[i] == 1 }).count(); - let nv = range(0u, 100).filter(|&i| { + let nv = (0u..100).filter(|&i| { v.borrow()[i+100] == 1 }).count(); diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index 84f01f70c3e..dc16fd88201 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1198,7 +1198,7 @@ mod test_set { #[test] fn test_drain() { - let mut s: HashSet<int> = range(1, 100).collect(); + let mut s: HashSet<int> = (1..100).collect(); // try this a bunch of times to make sure we don't screw up internal state. for _ in range(0i, 20) { |
