Copy each value from `src` through the corresponding pointer in `dst`. # Safety `dst` and `src` must have equal length (enforced by debug assert). Every pointer in `dst` must be valid for writes of `T` and properly aligned. Aliased pointers within `dst` produce undefined behaviour. No concurrent reader may access the locations written through `dst`.
(dst: &mut [*mut T], src: &[T])
| 7 | /// aligned. Aliased pointers within `dst` produce undefined behaviour. |
| 8 | /// * No concurrent reader may access the locations written through `dst`. |
| 9 | pub unsafe fn copy_vec_ptr<T>(dst: &mut [*mut T], src: &[T]) |
| 10 | where |
| 11 | T: Copy, |
| 12 | { |
| 13 | assert_eq!(dst.len(), src.len(), "Should use same length vectors"); |
| 14 | for (&mut p, &s) in dst.iter_mut().zip(src) { |
| 15 | *p = s; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | /// Pairwise-swap the values pointed to by `lhs` and `rhs`. |
| 20 | /// |