On Mon, Jun 16, 2014 at 5:24 PM, Patrick Walton <pcwal...@mozilla.com> wrote:
> I don't see much of a use case for `Add` without move semantics. Does anyone
> have any?
>
> Strings and vectors, perhaps, but I would argue that having to call
> `.clone()` on the LHS or RHS (as appropriate) is an improvement, because
> cloning strings and vectors can be very expensive.

For a vector, calling .clone() on either side is guaranteed to make a
duplicate copy, since a cloned LHS will have capacity = size and will
have to be thrown away in favor of a larger combined buffer.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to