rustlings
rustlings copied to clipboard
vecs1: add hint for to_vec()
It actually only case 2 that fulfils the excersise instruction to use macro...
hmm, I disagree, to_vec
doesn't define a vec, it copies into a vec. I don't think that's the solution we should hint at here, but it could be something we encourage users to try out in addition (something like "By the way, there's also a way to convert the array into a Vec directly, without having to specify its values again. Can you find out what it is?"
But to_vec
also define a vector...
The vector did not exist before this method is called.
Closing because I don't think we should recommend .to_vec()
in this case :)