Expand description
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 slice_mip::MapInPlace;
let mut buf = [1, 2, 3, 4];
buf.map_in_place(|x| x * 2);
assert_eq!(buf, [2, 4, 6, 8]);Traits§
- MapIn
Place - A sequence that can be mutated in place.