What must I cast an `u8` to in able to use it as an index in my vector?
Indices are of type usize
; usize
is used for sizes of collections, or indices into collections. It represents the native pointer size on your architecture.
This is what you need to use for this to work properly:
println!("{}", vec2d[usize::from(row)][usize::from(col)]);