diff options
| author | liv <mokou@fastmail.com> | 2023-06-12 12:39:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-12 12:39:02 +0200 |
| commit | b44472b2372ef29f6c7053d0f8e87479fd02c52d (patch) | |
| tree | 3f549ec5f5b85cd5c8cc6bf530a42bdde379644b /exercises/hashmaps | |
| parent | 7eef5d15eef780f93e22b1b4e0185f7708219ea0 (diff) | |
| parent | 4cfcf2ccd783fe3b7b28a3cae878d56ae3334b69 (diff) | |
Merge branch 'main' into comment_cleanup
Diffstat (limited to 'exercises/hashmaps')
| -rw-r--r-- | exercises/hashmaps/hashmaps2.rs | 9 | ||||
| -rw-r--r-- | exercises/hashmaps/hashmaps3.rs | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/exercises/hashmaps/hashmaps2.rs b/exercises/hashmaps/hashmaps2.rs index f913848..a592569 100644 --- a/exercises/hashmaps/hashmaps2.rs +++ b/exercises/hashmaps/hashmaps2.rs @@ -81,4 +81,13 @@ mod tests { let count = basket.values().sum::<u32>(); assert!(count > 11); } + + #[test] + fn all_fruit_types_in_basket() { + let mut basket = get_fruit_basket(); + fruit_basket(&mut basket); + for amount in basket.values() { + assert_ne!(amount, &0); + } + } } diff --git a/exercises/hashmaps/hashmaps3.rs b/exercises/hashmaps/hashmaps3.rs index 4b48e09..08e977c 100644 --- a/exercises/hashmaps/hashmaps3.rs +++ b/exercises/hashmaps/hashmaps3.rs @@ -18,9 +18,8 @@ use std::collections::HashMap; -// A structure to store team name and its goal details. +// A structure to store the goal details of a team. struct Team { - name: String, goals_scored: u8, goals_conceded: u8, } |
