Closed zakarumych closed 4 years ago
Hi! Thanks for this PR, I've wanted this for a while, but have never gotten around to it. I'll dig into the code in a little bit.
@jorendorff, I know that jsparagus has a similar thing, would merging this PR allow you to remove your bespoke Box
and use this instead? (if not, why not?)
There's handy feature for doc generation available on nightly, which allows marking parts of API as feature-gated. Would you consider running doc-test on nightly? Otherwise I have to remove it.
Most of the code is a copy of Rust's
alloc::boxed::Box
. New type is behind feature "boxed".Also adds
Vec::into_boxed_slice
andFrom<Vec<T>> for Box<[T]>
when both "boxed" and "collections" features are enabled.