1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-17 00:07:35 +02:00

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.
This commit is contained in:
Pete Pavlovski
2021-04-20 12:15:49 +03:00
committed by GitHub
parent 3a06de71a8
commit 72aaa15e6a

View File

@ -68,7 +68,7 @@ mod tests {
let mut basket = get_fruit_basket(); let mut basket = get_fruit_basket();
fruit_basket(&mut basket); fruit_basket(&mut basket);
let count_fruit_kinds = basket.len(); let count_fruit_kinds = basket.len();
assert!(count_fruit_kinds == 5); assert!(count_fruit_kinds >= 5);
} }
#[test] #[test]