boxchop 0.1.0

A crate for creating boxed slices
Documentation

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.