]> git.lizzy.rs Git - rust.git/commit
rollup merge of #20214: bluss/fix-hashmap-example
authorAlex Crichton <alex@alexcrichton.com>
Tue, 30 Dec 2014 00:36:05 +0000 (16:36 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 30 Dec 2014 00:36:05 +0000 (16:36 -0800)
commit9f6eb29a9dc4b3236bde6afb1da4fcee49f5bd6a
tree5a215e9f68b17a965ede8a8cd65e39b7d33ca3b1
parent9ac9d7af3b60c8536034a41434ab52e6261d8c24
parent11146856969515807f85796028d8a214aaac0528
rollup merge of #20214: bluss/fix-hashmap-example

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.