Loading RustViz Engine...
Divide a mutable slice into two non-overlapping mutable slices safe from aliasing.
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 split_half<T>(slice: &mut [T]) -> (&mut [T], &mut [T]) {
let mid = slice.len() / 2;
slice.split_at_mut(mid)
}