copy_from_slice
requires the source and destination slices to have the same lenght.
How can I copy from a slice smaller than its destination?
The closest I found was How do you copy between arrays of different sizes in Rust?, it lists
for (dst, src) in slice_destination.iter_mut().zip(slice_source) {
*dst = *src
}
It worked for me. But is there an easier way?