What would be the idiomatic way of converting arrays or vectors of one type to another in Rust? The desired effect is
let x = ~[0 as int, 1 as int, 2 as int];
let y = vec::map(x, |&e| { e as uint });
but I'm not sure if the same could be achieved in a more concise fashion, similar to scalar type-casts.
I seem to fail at finding clues in the Rust manual or reference. TIA.
map
will be good enough. – Lopez