Skip to content

Commit 72aaa15

Browse files
authored
fix(hashmap2): Update incorrect assertion (#660)
The test description says "at least five types of fruit", but the test itself is checking for exactly five types of fruit, which was a bit misleading for newcomers like me :) A simple change from "==" to ">=" should do the trick and successfully check for the "at least" condition.
1 parent 3a06de7 commit 72aaa15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/collections/hashmap2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mod tests {
6868
let mut basket = get_fruit_basket();
6969
fruit_basket(&mut basket);
7070
let count_fruit_kinds = basket.len();
71-
assert!(count_fruit_kinds == 5);
71+
assert!(count_fruit_kinds >= 5);
7272
}
7373

7474
#[test]

0 commit comments

Comments
 (0)