From 7d661af9c86566088f7dbaeee25143ecde673b75 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 26 Jan 2015 15:46:12 -0500 Subject: `for x in range(a, b)` -> `for x in a..b` sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs --- src/libsyntax/parse/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/mod.rs') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 4bd476885a0..7834fae6276 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -472,7 +472,7 @@ pub fn str_lit(lit: &str) -> String { } else { // otherwise, a normal escape let (c, n) = char_lit(&lit[i..]); - for _ in range(0, n - 1) { // we don't need to move past the first \ + for _ in 0..n - 1 { // we don't need to move past the first \ chars.next(); } res.push(c); @@ -635,7 +635,7 @@ pub fn binary_lit(lit: &str) -> Rc> { // otherwise, a normal escape let (c, n) = byte_lit(&lit[i..]); // we don't need to move past the first \ - for _ in range(0, n - 1) { + for _ in 0..n - 1 { chars.next(); } res.push(c); -- cgit 1.4.1-3-g733a5