summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
authorAdam Brewer <adamhb321@gmail.com>2023-03-10 14:13:06 -0500
committerAdam Brewer <adamhb321@gmail.com>2023-03-10 14:13:06 -0500
commit7bab78c66d4c0fff4b9f7ca082964353215265e3 (patch)
tree5323e4d87d529c88c235206bd12a99f54c12ea23 /exercises
parent7f1754ecc5690f31db4aff38eef2bf30e2aec525 (diff)
Rename iteration var names in vec2.rs for clarity
Resolves #1417
Diffstat (limited to 'exercises')
-rw-r--r--exercises/vecs/vecs2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/exercises/vecs/vecs2.rs b/exercises/vecs/vecs2.rs
index 5bea09a..1ea2607 100644
--- a/exercises/vecs/vecs2.rs
+++ b/exercises/vecs/vecs2.rs
@@ -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!
???