1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-12-01 22:51:45 +02:00

Merge branch 'main' into comment_cleanup

This commit is contained in:
liv
2023-06-12 12:39:02 +02:00
committed by GitHub
8 changed files with 161 additions and 90 deletions

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