diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-26 16:05:07 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-29 07:49:01 -0500 |
| commit | efc97a51ffc798247e36156cf8e2d175bf509018 (patch) | |
| tree | 2add0ca20cbe4fc9abec6e98d5d15e2065d12322 /src/libcore | |
| parent | 7d661af9c86566088f7dbaeee25143ecde673b75 (diff) | |
| download | rust-efc97a51ffc798247e36156cf8e2d175bf509018.tar.gz rust-efc97a51ffc798247e36156cf8e2d175bf509018.zip | |
convert remaining `range(a, b)` to `a..b`
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/borrow.rs | 2 | ||||
| -rw-r--r-- | src/libcore/str/mod.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/borrow.rs b/src/libcore/borrow.rs index be144b052c7..035443e9c3f 100644 --- a/src/libcore/borrow.rs +++ b/src/libcore/borrow.rs @@ -125,7 +125,7 @@ impl<T> ToOwned<T> for T where T: Clone { /// use std::borrow::Cow; /// /// fn abs_all(input: &mut Cow<Vec<int>, [int]>) { -/// for i in range(0, input.len()) { +/// for i in 0..input.len() { /// let v = input[i]; /// if v < 0 { /// // clones into a vector the first time (if not already owned) diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index dc57d22bbca..9f1d781fcbf 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -800,7 +800,7 @@ impl TwoWaySearcher { // See if the right part of the needle matches let start = if long_period { self.crit_pos } else { cmp::max(self.crit_pos, self.memory) }; - for i in range(start, needle.len()) { + for i in start..needle.len() { if needle[i] != haystack[self.position + i] { self.position += i - self.crit_pos + 1; if !long_period { |
