the current implementation on conversions.rs:
impl<T, const N: usize, A: Allocator> From<SmallVec<T, N, A>> for Box<[T]> {
fn from(this: SmallVec<T, N, A>) -> Self {
Vec::from(this).into_boxed_slice()
}
}
first converts it to a Vec and changes the allocator before converting it into a box in Global
the correct implementation should preserve the allocator and not make use of an intermediary Vec:
impl<T, const N: usize, A: Allocator> From<SmallVec<T, N, A>> for Box<[T], A>
the current implementation on
conversions.rs:first converts it to a
Vecand changes the allocator before converting it into a box inGlobalthe correct implementation should preserve the allocator and not make use of an intermediary
Vec: