This crate provides a single function, a safe wrapper around
for efficient copying within slices. The goal is to eventually include this
as a built-in method on slices in libcore (PR #53652).
Copying four bytes within a slice:
let mut bytes = *b"Hello, World!"; copy_in_place(&mut bytes, 1..5, 8); assert_eq!(&bytes, b"Hello, Wello!");
Copies elements from one part of a slice to another part of the same slice, using a memmove.