mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Add required type annotation
This commit is contained in:
parent
99496706c5
commit
0e090ae112
|
@ -17,7 +17,7 @@ struct TeamScores {
|
||||||
|
|
||||||
fn build_scores_table(results: &str) -> HashMap<&str, 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.
|
// 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() {
|
for line in results.lines() {
|
||||||
let mut split_iterator = line.split(',');
|
let mut split_iterator = line.split(',');
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct TeamScores {
|
||||||
|
|
||||||
fn build_scores_table(results: &str) -> HashMap<&str, 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.
|
// 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() {
|
for line in results.lines() {
|
||||||
let mut split_iterator = line.split(',');
|
let mut split_iterator = line.split(',');
|
||||||
|
|
Loading…
Reference in a new issue