summaryrefslogtreecommitdiff
path: root/solutions/11_hashmaps/hashmaps3.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-10-17 14:48:56 +0200
committermo8it <mo8it@proton.me>2024-10-17 14:49:07 +0200
commit0e090ae11244ee8e0cdb50501b34c36a7112fd0c (patch)
tree5f9d0b98d6b3f055ae1a65bf607ff97f3c89f1e3 /solutions/11_hashmaps/hashmaps3.rs
parent99496706c5041affdc252649bfc74d50a2187271 (diff)
Add required type annotation
Diffstat (limited to 'solutions/11_hashmaps/hashmaps3.rs')
-rw-r--r--solutions/11_hashmaps/hashmaps3.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/solutions/11_hashmaps/hashmaps3.rs b/solutions/11_hashmaps/hashmaps3.rs
index 41da784..433b16c 100644
--- a/solutions/11_hashmaps/hashmaps3.rs
+++ b/solutions/11_hashmaps/hashmaps3.rs
@@ -17,7 +17,7 @@ struct TeamScores {
fn build_scores_table(results: &str) -> HashMap<&str, TeamScores> {
// The name of the team is the key and its associated struct is the value.
- let mut scores = HashMap::new();
+ let mut scores = HashMap::<&str, TeamScores>::new();
for line in results.lines() {
let mut split_iterator = line.split(',');