Walter Bright <[email protected]> wrote: > I'm not very familiar with Rust. Can you post what a Rust declaration for > memcpy > would look like with all the guarantees?
You wouldn't use memcpy but just assign the slices. Assignment is always just memcpy in Rust because of move-semantics: a[m1..n1] = b[m2..n2]; It will panic if sizes don't match. But if you still wanted a memcpy it would probably look like this: fn memcpy<'a, T>(dest: &'a mut [T], src: &[T]) -> &'a mut [T]
