Auto merge of #216 - Alexendoo:clone-slice-from, r=mbrubeck

Implement Clone using From

This allows using the specialization in clones when it's enabled
This commit is contained in:
bors-servo
2020-04-25 13:01:44 -04:00
committed by GitHub
+1 -5
View File
@@ -1563,11 +1563,7 @@ where
{
#[inline]
fn clone(&self) -> SmallVec<A> {
let mut new_vector = SmallVec::with_capacity(self.len());
for element in self.iter() {
new_vector.push((*element).clone())
}
new_vector
SmallVec::from(self.as_slice())
}
}