From d196c2b818df476ae3b80bb3165d4f63fdfd054b Mon Sep 17 00:00:00 2001 From: Joseph Crail Date: Sun, 11 Jan 2015 23:54:25 -0500 Subject: [PATCH] Remove range function. For the pi benchmark, I replaced the range function with the new range syntax. --- benches/shootout-pidigits.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/shootout-pidigits.rs b/benches/shootout-pidigits.rs index 93ed28c..b553150 100644 --- a/benches/shootout-pidigits.rs +++ b/benches/shootout-pidigits.rs @@ -95,7 +95,7 @@ fn pidigits(n: int) { let mut k = 0; let mut context = Context::new(); - for i in range(1, n + 1) { + for i in (1..(n+1)) { let mut d; loop { k += 1; @@ -112,7 +112,7 @@ fn pidigits(n: int) { let m = n % 10; if m != 0 { - for _ in range(m, 10) { print!(" "); } + for _ in (m..10) { print!(" "); } print!("\t:{}\n", n); } }