about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-26 15:44:22 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-29 07:46:44 -0500
commitc300d681bd2e901ef39591bbfb1ea4568ac6be70 (patch)
treeee0b4b0a74846595b700d1b2375fd10309b63a22 /src/libcore
parentbedd8108dc9b79402d1ea5349d766275f73398ff (diff)
downloadrust-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/libcore')
-rw-r--r--src/libcore/fmt/float.rs2
-rw-r--r--src/libcore/iter.rs2
-rw-r--r--src/libcore/str/mod.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libcore/fmt/float.rs b/src/libcore/fmt/float.rs
index 50123499eba..2c89c7ffa3b 100644
--- a/src/libcore/fmt/float.rs
+++ b/src/libcore/fmt/float.rs
@@ -242,7 +242,7 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
                     if i < 0
                     || buf[i as uint] == b'-'
                     || buf[i as uint] == b'+' {
-                        for j in range(i as uint + 1, end).rev() {
+                        for j in (i as uint + 1..end).rev() {
                             buf[j + 1] = buf[j];
                         }
                         buf[(i + 1) as uint] = value2ascii(1);
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 74d8a7ae1d6..173bfbaca6b 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -717,7 +717,7 @@ pub trait IteratorExt: Iterator + Sized {
         Self: ExactSizeIterator + DoubleEndedIterator
     {
         let len = self.len();
-        for i in range(0, len).rev() {
+        for i in (0..len).rev() {
             if predicate(self.next_back().expect("rposition: incorrect ExactSizeIterator")) {
                 return Some(i);
             }
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index 101d349c351..dc57d22bbca 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -812,7 +812,7 @@ impl TwoWaySearcher {
 
             // See if the left part of the needle matches
             let start = if long_period { 0 } else { self.memory };
-            for i in range(start, self.crit_pos).rev() {
+            for i in (start..self.crit_pos).rev() {
                 if needle[i] != haystack[self.position + i] {
                     self.position += self.period;
                     if !long_period {