[rust-dev] strings in sets/maps

Diggory Hardy lists at dhardy.name
Sun Jun 8 03:50:51 PDT 2014


Just adding doc for common cases is enough in my opinion. If you add StringMap you've got four 
possible variants (map/set and tree/hash); even without that another "class" just to rename a few 
methods.
 
Diggory

On Friday 06 Jun 2014 08:44:12 Patrick Walton wrote:
> 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
> 
> _______________________________________________
> Rust-dev mailing list
> Rust-dev at mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20140608/71d468aa/attachment.html>


More information about the Rust-dev mailing list