On 12/17/2012 04:42 PM, Patrick Walton wrote:
> 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).
I read up on borrowed pointers and made find() return &self/V. After
turning this:
impl<K:Eq IterBytes Hash, V: Copy> LinearMap<K, V>: Map<K, V> {
into this:
impl<K:Eq IterBytes Hash, V> LinearMap<K, V>: Map<K, V> {
(removing the Copy trait from V) it all worked as expected. Thanks for
leading me into the right direction!
- Tim
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev