iter without map with iterator : I am starting in the hard way of learning Rust, and I have a probably newbie's question : How to improve this function :

    
    fn get_grid() -> [[u8; 9]; 9]
    {
	let mut grid: [[u8; 9]; 9] = Default::default();
	let mut args: Vec<String> = env::args().collect();

	if args.len() != 10 {
		eprintln!("This program need 9 strings of 9 numbers between 0 and 9");
		exit(1);
	}

	args.remove(0);

	let _: Vec<_> = args.iter().enumerate().map(|(i, arg)| {
		let _line: Vec<_> = arg.split(' ').enumerate().map(|(j, value)| {
			match value.parse() {
				Ok(x) => {
					grid[i][j] = x;
					x
				},
				Err(e) => {
					eprintln!("Value {} is not a valid integer [{}]", value, e);
					exit(1);
				},
			}
		}).collect();
	}).collect();

	return grid;
    }

( Sorry for the indentation, SO's indentation is not my friend ).

As far as I understand ".map()", it will, when collecting, build a new iterable ( Vector atm ), and return it. Actually I don't need to have this iterable, I just want to modify an external array, and not have anything built from this iteration.

In javascript, there is .map, but also a .forEach that iter on map and returns nothing. Is there any equivalent in Rust ??

I could probably just use a `for (index, value) in args.iter().enumerate()` but I am searching a way to avoid explicit loop, if there is one.

Any criticism is welcome.
Thanks