Merge pull request #47 from jbcrail/fix-deprecated-range
Remove range function.
This commit is contained in:
commit
bde434903d
|
@ -95,7 +95,7 @@ fn pidigits(n: isize) {
|
||||||
let mut k = 0;
|
let mut k = 0;
|
||||||
let mut context = Context::new();
|
let mut context = Context::new();
|
||||||
|
|
||||||
for i in range(1, n + 1) {
|
for i in (1..(n+1)) {
|
||||||
let mut d;
|
let mut d;
|
||||||
loop {
|
loop {
|
||||||
k += 1;
|
k += 1;
|
||||||
|
@ -112,7 +112,7 @@ fn pidigits(n: isize) {
|
||||||
|
|
||||||
let m = n % 10;
|
let m = n % 10;
|
||||||
if m != 0 {
|
if m != 0 {
|
||||||
for _ in range(m, 10) { print!(" "); }
|
for _ in (m..10) { print!(" "); }
|
||||||
print!("\t:{}\n", n);
|
print!("\t:{}\n", n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue