1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Mutate a slice in place with a map function.
//!
//! Note that the map result type must be the same as the input type.
//!
//! ## Example
//!
//! ```rust
//! 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]);
//! ```
/// A sequence that can be mutated in place.