Hacker News new | ask | show | jobs
by steveklabnik 2683 days ago
Semantically, it’s always a memcpy. In practice, the copy can be elided depending on circumstance. But that’s an optimization, not the semantic.

(And yeah, Copy types are like that too; the only semantic difference between Copy and move is if you can use the old binding.)

Any time! And yeah, the rust forums are probably better but it’s no big deal :)

1 comments

OK, cool, so in this case it's just that the Rust compiler isn't optimizing away the memcpy. Thanks!