Mutate a slice in place with a map function.
Note that the map result type must be the same as the input type.
Example
use MapInPlace;
let mut buf = ;
buf.map_in_place;
assert_eq!;
Mutate a slice in place with a map function.
Note that the map result type must be the same as the input type.
use slice_mip::MapInPlace;
let mut buf = [1, 2, 3, 4];
buf.map_in_place(|x| x * 2);
assert_eq!(buf, [2, 4, 6, 8]);