Loading RustViz Engine...
Copy non-overlapping slices of Copy types using ptr::copy_nonoverlapping.
This problem is currently in blueprint template mode. Once the concept foundation is finalized, live in-browser WebAssembly compilation and test assertion runners will be enabled here.
pub fn fast_copy<T: Copy>(src: &[T], dst: &mut [T]) {
assert!(dst.len() >= src.len());
unsafe {
std::ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len());
}
}