From c300d681bd2e901ef39591bbfb1ea4568ac6be70 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 26 Jan 2015 15:44:22 -0500 Subject: `range(a, b).foo()` -> `(a..b).foo()` sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs --- src/libcore/str/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcore/str') 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 { -- cgit 1.4.1-3-g733a5