| Crates.io | boxchop |
| lib.rs | boxchop |
| version | 0.1.0 |
| created_at | 2020-08-20 22:15:08.349667+00 |
| updated_at | 2020-08-20 22:15:08.349667+00 |
| description | A crate for creating boxed slices |
| homepage | https://github.com/clavin/boxchop |
| repository | https://github.com/clavin/boxchop |
| max_upload_size | |
| id | 278938 |
| size | 8,294 |
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.