Remove range function.

For the pi benchmark, I replaced the range function with the new range
syntax.
This commit is contained in:
Joseph Crail 2015-01-11 23:54:25 -05:00
parent cbf04cf664
commit d196c2b818
1 changed files with 2 additions and 2 deletions

View File

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