I want to change the value inside the loop, as in the comment. It should be simple, but I do not see a solution.
fn main() { let mut grid: [[i32; 10]; 10] = [[5; 10]; 10]; for (i, row) in grid.iter_mut().enumerate() { for (y, col) in row.iter_mut().enumerate() { //grid[i][y] = 7; print!("{}", col); } print!("{}","\n"); } }
source share