diff --git a/lib.rs b/lib.rs index 0c8243e..d43700a 100644 --- a/lib.rs +++ b/lib.rs @@ -1684,6 +1684,17 @@ impl_array!( 0x40000, 0x60000, 0x80000, 0x10_0000 ); +trait ToSmallVec { + fn to_smallvec(&self) -> SmallVec; +} + +impl ToSmallVec for [A::Item] + where A::Item: Copy { + fn to_smallvec(&self) -> SmallVec { + SmallVec::from_slice(self) + } +} + #[cfg(test)] mod tests { use crate::SmallVec;