boxchop 0.1.0

A crate for creating boxed slices
Documentation
  • Coverage
  • 100%
    8 out of 8 items documented7 out of 7 items with examples
  • Size
  • Source code size: 7.92 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.28 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • clavin/boxchop
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • clavin

boxchop

Documentation | View on libs.rs

A tiny library for creating boxed slices Box<[T]>.

let nums = boxchop::new_with(5, |x| x + 1);

assert_eq!(
    nums,
    Box::from([1, 2, 3, 4, 5]),
);

⚠️ This was created before I found the new_uninit nightly feature. The fundamental itch this crate scratches will eventually be part of the standard library: see Box::new_uninit_slice and Box::assume_init.