mirror of
https://github.com/notohh/rustlings.git
synced 2025-09-16 19:13:14 -04:00
Merge branch 'main' into comment_cleanup
This commit is contained in:
commit
b44472b237
8 changed files with 161 additions and 90 deletions
exercises/hashmaps
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue