Declare vector using macro in vecs1.rs

This commit is contained in:
Rock070 2023-12-17 00:06:16 +08:00
parent 86d4b548b7
commit 294c97b9fc

View File

@ -7,11 +7,10 @@
//
// Execute `rustlings hint vecs1` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
fn array_and_vec() -> ([i32; 4], Vec<i32>) {
let a = [10, 20, 30, 40]; // a plain array
let v = // TODO: declare your vector here with the macro for vectors
// TODO: declare your vector here with the macro for vectors
let v: Vec<i32> = vec!(10, 20, 30, 40);
(a, v)
}