Skip to content

Commit ab9995e

Browse files
committed
doc: Update collections exercises instruction to match the standard naming
1 parent bef39b1 commit ab9995e

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

exercises/collections/hashmap1.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
// Make me compile and pass the tests!
1010
//
11-
// Execute the command `rustlings hint collections3` if you need
11+
// Execute the command `rustlings hint hashmap1` if you need
1212
// hints.
1313

1414
// I AM NOT DONE
@@ -39,8 +39,6 @@ mod tests {
3939
#[test]
4040
fn at_least_five_fruits() {
4141
let basket = fruit_basket();
42-
assert!(basket
43-
.values()
44-
.sum::<u32>() >= 5);
42+
assert!(basket.values().sum::<u32>() >= 5);
4543
}
4644
}

exercises/collections/hashmap2.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
// Make me pass the tests!
1111
//
12-
// Execute the command `rustlings hint collections4` if you need
12+
// Execute the command `rustlings hint hashmap2` if you need
1313
// hints.
1414

1515
// I AM NOT DONE
@@ -75,9 +75,7 @@ mod tests {
7575
fn greater_than_eleven_fruits() {
7676
let mut basket = get_fruit_basket();
7777
fruit_basket(&mut basket);
78-
let count = basket
79-
.values()
80-
.sum::<u32>();
78+
let count = basket.values().sum::<u32>();
8179
assert!(count > 11);
8280
}
8381
}

exercises/collections/vec1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Your task is to create a `Vec` which holds the exact same elements
33
// as in the array `a`.
44
// Make me compile and pass the test!
5-
// Execute the command `rustlings hint collections1` if you need hints.
5+
// Execute the command `rustlings hint vec1` if you need hints.
66

77
// I AM NOT DONE
88

exercises/collections/vec2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Make me pass the test!
66
//
7-
// Execute the command `rustlings hint collections2` if you need
7+
// Execute the command `rustlings hint vec2` if you need
88
// hints.
99

1010
// I AM NOT DONE

0 commit comments

Comments
 (0)