Just curious, is there a way to define a Vector with the vec! macro on an array variable?
The bellow code compiles fine:
let a = [1,2,3,4]
let v = vec![1,2,3,4]
But I get a mismatched types error when compiling this:
let a = [1,2,3,4]
let v = vec!a
This seems like it should intuitively work but I'm coming from Python so I often expect little shortcuts like that and that sometimes leads me astray. What's the best way to quickly initialize a Vector with the values in an already-existent array?