mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 18:13:29 +02:00
Require a main function in all exercises
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
// Example: England,France,4,2 (England scored 4 goals, France 2).
|
||||
//
|
||||
// You have to build a scores table containing the name of the team, the total
|
||||
// number of goals the team scored, and the total number of goals the team
|
||||
// conceded. One approach to build the scores table is to use a Hashmap.
|
||||
// The solution is partially written to use a Hashmap,
|
||||
// number of goals the team scored, and the total number of goals the team
|
||||
// conceded. One approach to build the scores table is to use a Hashmap.
|
||||
// The solution is partially written to use a Hashmap,
|
||||
// complete it to pass the test.
|
||||
//
|
||||
// Make me pass the tests!
|
||||
@@ -42,6 +42,10 @@ fn build_scores_table(results: String) -> HashMap<String, Team> {
|
||||
scores
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// You can optionally experiment here.
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user