[rust-dev] strings in sets/maps

Patrick Walton pcwalton at mozilla.com
Fri Jun 6 08:44:12 PDT 2014


On 6/6/14 6:40 AM, Diggory Hardy wrote:
> Dear List,
>
> I want to use strings as map keys, but couldn't find any mention of this
> in my understanding common use-case. The following works but as far as I
> understand requires a copy of the potential key to be made to call
> `contains()`, is this correct?

I've been thinking for a while that we should provide a `StringMap` for 
this common use case, to make the `equiv()` stuff easier to sort out. 
"Easy things should be easy; hard things should be possible."

Patrick



More information about the Rust-dev mailing list