slice_mip 1.0.0

Mutate a slice in place with a map function
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented1 out of 3 items with examples
  • Size
  • Source code size: 3.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.09 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • kchmck/slice_mip.rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kchmck

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]);