📜  rust iterate 2D - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:13.248000             🧑  作者: Mango

代码示例1
for y in 0..my_array.len() {  //y coord
    for x in 0..my_array[y].len() {  // x coord
        if x == 10 {
            my_array[x][y] = 3;
        }
        //println!("my_array (x,y): ({}, {})", x, y);
    }
}