TinyVec::from([T]) (#66)

This commit is contained in:
Evgeny Rozaliev
2020-03-17 23:15:39 +03:00
committed by GitHub
parent 515171daa9
commit 5ba37a6b3a
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -709,6 +709,12 @@ impl<A: Array> From<ArrayVec<A>> for TinyVec<A> {
}
}
impl<A: Array> From<A> for TinyVec<A> {
fn from(array: A) -> Self {
TinyVec::Inline(ArrayVec::from(array))
}
}
impl<T, A> From<&'_ [T]> for TinyVec<A>
where
T: Clone + Default,