Skip to content

Commit 7bab78c

Browse files
committed
Rename iteration var names in vec2.rs for clarity
Resolves #1417
1 parent 7f1754e commit 7bab78c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/vecs/vecs2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// I AM NOT DONE
1010

1111
fn vec_loop(mut v: Vec<i32>) -> Vec<i32> {
12-
for i in v.iter_mut() {
12+
for element in v.iter_mut() {
1313
// TODO: Fill this up so that each element in the Vec `v` is
1414
// multiplied by 2.
1515
???
@@ -20,7 +20,7 @@ fn vec_loop(mut v: Vec<i32>) -> Vec<i32> {
2020
}
2121

2222
fn vec_map(v: &Vec<i32>) -> Vec<i32> {
23-
v.iter().map(|num| {
23+
v.iter().map(|element| {
2424
// TODO: Do the same thing as above - but instead of mutating the
2525
// Vec, you can just return the new number!
2626
???

0 commit comments

Comments
 (0)