File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,12 @@ fn solve_grid(g: grid_t) {
59
59
drop_colors ( g, avail, row, col) ;
60
60
61
61
// find first remaining color that is available
62
- let mut i = 1 as uint ;
63
- while i < ( 10 as uint ) { /* FIXME llvm ctlhd */
62
+ for uint:: range( 1 u, 10 u) { |i|
64
63
if bitv:: get ( avail, i) {
65
64
g[ row] [ col] = i as u8 ;
66
65
ret true;
67
66
}
68
- i += 1 as uint ; /* else */
69
- }
67
+ } ;
70
68
}
71
69
g[ row] [ col] = 0u8 ;
72
70
ret false;
@@ -131,6 +129,7 @@ fn write_grid(f: io::writer, g: grid_t) {
131
129
fn main ( args : [ str ] ) {
132
130
let grid = if vec:: len ( args) == 1 u {
133
131
// FIXME create sudoku inline since nested vec consts dont work yet
132
+ // (#571)
134
133
let g = vec:: from_fn ( 10 u, { |_i|
135
134
vec:: to_mut ( vec:: from_elem ( 10 u, 0 as u8 ) )
136
135
} ) ;
You can’t perform that action at this time.
0 commit comments