Rust PR: #53652
Standalone implementation: https://github.com/oconnor663/copy_in_place
Summary: This is a safe wrapper around ptr::copy, for regions within a single slice. Previously, safe in-place copying was only available as a side effect of Vec::drain.
Open questions: @SimonSapin had a proposal for an alternative API using ranges. Here's an example PR along those lines: oconnor663/copy_in_place#1
Rust PR: #53652
Standalone implementation: https://github.com/oconnor663/copy_in_place
Summary: This is a safe wrapper around
ptr::copy, for regions within a single slice. Previously, safe in-place copying was only available as a side effect ofVec::drain.Open questions: @SimonSapin had a proposal for an alternative API using ranges. Here's an example PR along those lines: oconnor663/copy_in_place#1