mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-03-31 03:29:19 +00:00
Improve vecs2 comments for beginners
#2221 Simplified TODO comment and added hint for beginners.
This commit is contained in:
parent
37cbcd9049
commit
61368257be
@ -2,8 +2,9 @@ fn vec_loop(input: &[i32]) -> Vec<i32> {
|
||||
let mut output = Vec::new();
|
||||
|
||||
for element in input {
|
||||
// TODO: Multiply each element in the `input` slice by 2 and push it to
|
||||
// the `output` vector.
|
||||
// TODO: Loop through each number in `input`,
|
||||
// multiply it by 2, and add it to the `output` vector.
|
||||
// Hint: Use a `for` loop and the `push` method.
|
||||
}
|
||||
|
||||
output
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user