mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-23 03:38:09 -05:00
parent
7f1754ecc5
commit
7bab78c66d
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
|||
// I AM NOT DONE
|
||||
|
||||
fn vec_loop(mut v: Vec<i32>) -> Vec<i32> {
|
||||
for i in v.iter_mut() {
|
||||
for element in v.iter_mut() {
|
||||
// TODO: Fill this up so that each element in the Vec `v` is
|
||||
// multiplied by 2.
|
||||
???
|
||||
|
@ -20,7 +20,7 @@ fn vec_loop(mut v: Vec<i32>) -> Vec<i32> {
|
|||
}
|
||||
|
||||
fn vec_map(v: &Vec<i32>) -> Vec<i32> {
|
||||
v.iter().map(|num| {
|
||||
v.iter().map(|element| {
|
||||
// TODO: Do the same thing as above - but instead of mutating the
|
||||
// Vec, you can just return the new number!
|
||||
???
|
||||
|
|
Loading…
Reference in a new issue