Is My Highly Unsafe Code Correct? In Place Mapping a Vector

Yes.

No. &mut [T] coerces to *mut [T]. Rust is not C. Types matter.

1 Like