convert remaining range(a, b) to a..b

This commit is contained in:
Jorge Aparicio 2015-01-26 16:05:07 -05:00
parent 7d661af9c8
commit efc97a51ff
48 changed files with 101 additions and 102 deletions

View file

@ -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)

View file

@ -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 {