diff options
| author | tajo48 <55502906+tajo48@users.noreply.github.com> | 2023-06-15 00:46:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-15 00:46:45 +0200 |
| commit | e1704a2f1bd2e1c92e0741d656228fe6ccf36a35 (patch) | |
| tree | 6bbd1dd1ea127dd652e0fe64093c10a78734fdf5 /exercises/hashmaps/hashmaps3.rs | |
| parent | 1e02f194fdd1cb1ca99cf1d93d11455db8b1bce6 (diff) | |
| parent | 0282da6881c0708b5aaf6a01e731b88b61201f71 (diff) | |
Merge branch 'main' into main
Diffstat (limited to 'exercises/hashmaps/hashmaps3.rs')
| -rw-r--r-- | exercises/hashmaps/hashmaps3.rs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/exercises/hashmaps/hashmaps3.rs b/exercises/hashmaps/hashmaps3.rs index ad3baa6..08e977c 100644 --- a/exercises/hashmaps/hashmaps3.rs +++ b/exercises/hashmaps/hashmaps3.rs @@ -1,26 +1,25 @@ // hashmaps3.rs - -// A list of scores (one per line) of a soccer match is given. Each line -// is of the form : -// <team_1_name>,<team_2_name>,<team_1_goals>,<team_2_goals> +// +// A list of scores (one per line) of a soccer match is given. Each line is of +// the form : "<team_1_name>,<team_2_name>,<team_1_goals>,<team_2_goals>" // Example: England,France,4,2 (England scored 4 goals, France 2). - -// You have to build a scores table containing the name of the team, goals -// the team scored, and 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. - +// +// You have to build a scores table containing the name of the team, goals the +// team scored, and 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! - -// Execute `rustlings hint hashmaps3` or use the `hint` watch subcommand for a hint. +// +// Execute `rustlings hint hashmaps3` or use the `hint` watch subcommand for a +// hint. // I AM NOT DONE 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, } |
