Use the (stable) macro instead of the function

This commit is contained in:
Jef
2018-05-07 13:47:26 +02:00
parent 3da40a84b7
commit 932fddee30
+1 -1
View File
@@ -810,7 +810,7 @@ impl<A: Array> SmallVec<A> where A::Item: Clone {
/// ```
pub fn from_elem(elem: A::Item, n: usize) -> Self {
if n > A::size() {
::std::vec::from_elem(elem, n).into()
vec![elem; n].into()
} else {
unsafe {
let mut arr: A = ::std::mem::uninitialized();