1
0
Fork 0
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:
liv 2023-06-12 12:39:02 +02:00 committed by GitHub
commit b44472b237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 161 additions and 90 deletions
exercises/hashmaps

View file

@ -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);
}
}
}

View file

@ -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,
}