<p><span class="h-card" translate="no"><a href="https://hachyderm.io/@d2718" class="u-url mention">@<span>d2718</span></a></span> But they haven&#39;t written anything wrong. I&#39;m surprised you could think so of such a prominent Rust book. </p><p>In short, both &#39;copy&#39; and &#39;move&#39; are performed with `memcpy()`, which copies a block of memory from source to destination (bitwise, shallow copy).<br />In a case of &#39;move&#39;, this often gets optimized by compiler to not copying values. But optimizations are never guaranteed, in opposite to `memcpy()` calls.</p><p>P.S. I still find it unethical partially quoting someone without linking to source.</p>
Reply