[rust-dev] simple hash map for storing structs that contain ~str and/or ~[]

Patrick Walton pwalton at mozilla.com
Mon Dec 17 07:42:42 PST 2012

On 12/17/12 6:42 AM, Tim Taubert wrote:
> Is there anything I can do about this other than using managed boxes? I
> really don't want to force people to use GC.

Try returning a reference from find() instead. It's warning you that 
find() is copying out the data (since it returns V and not &V).

Incidentally, that warning may be turned off by default in the future, 
since it's incompatible with the new Clone trait and can be annoying in 
cases like this.


More information about the Rust-dev mailing list