Skip to content

Chapter 4 - Section Hashmaps - need to specify type for first example #9

Description

@glafrance

In Chapter 4 - Section hashmaps, for the first example I get an error that you must specify a type annotation for the hashmap.

So instead of this:

let mut scores = HashMap::new();

I did this:

let mut scores: HashMap<_, _> = HashMap::new();

Of course the actual type annotation would depend on the intent of the scores hashmap.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions