Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hashmap: Fix the example using derived Hash + Eq #20214

Merged
merged 1 commit into from
Dec 30, 2014

Conversation

bluss
Copy link
Member

@bluss bluss commented Dec 25, 2014

The example derived Hash + Eq on a type that was used as values for
a hashmap.. for the example to make sense, we have to use a custom key
type.

Write a slightly more involved example, still using Vikings, but this
time as key.

I preferred using String over &str here, since that's the typical usage
and we might want to lead users down that path.

The example derived Hash + Eq on a type that was used as *values* for
a hashmap.. for the example to make sense, we have to use a custom *key*
type.

Write a slightly more involved example, still using Vikings, but this
time as key.

I preferred using String over &str here, since that's the typical usage
and we might want to lead users down that path.
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

bors added a commit that referenced this pull request Dec 25, 2014
hashmap: Fix the example using derived Hash + Eq

Reviewed-by: alexcrichton
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 30, 2014
The example derived Hash + Eq on a type that was used as *values* for
a hashmap.. for the example to make sense, we have to use a custom *key*
type.

Write a slightly more involved example, still using Vikings, but this
time as key.

I preferred using String over &str here, since that's the typical usage
and we might want to lead users down that path.
@bors bors merged commit 1114685 into rust-lang:master Dec 30, 2014
@bluss bluss deleted the fix-hashmap-example branch December 30, 2014 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants