From 336697715baea26fe55ec4ae4c1a202e6d7ba88b Mon Sep 17 00:00:00 2001 From: Pete Pavlovski Date: Sat, 27 Feb 2021 22:19:09 +0200 Subject: [PATCH] update hashmap2 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. --- exercises/collections/hashmap2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/collections/hashmap2.rs b/exercises/collections/hashmap2.rs index 7e25be7c59..efc3ffa1cc 100644 --- a/exercises/collections/hashmap2.rs +++ b/exercises/collections/hashmap2.rs @@ -68,7 +68,7 @@ mod tests { let mut basket = get_fruit_basket(); fruit_basket(&mut basket); let count_fruit_kinds = basket.len(); - assert!(count_fruit_kinds == 5); + assert!(count_fruit_kinds >= 5); } #[test]