Alloc vec use imported path

mem::ManuallyDrop::new -> ManuallyDrop::new
This commit is contained in:
Ivan Tham
2020-09-29 23:00:02 +08:00
committed by GitHub
parent 9e34b72964
commit f9b625f8e0
+1 -1
View File
@@ -2288,7 +2288,7 @@ impl<T, I> SpecFromIter<T, I> for Vec<T>
.try_fold::<_, _, Result<_, !>>(sink, write_in_place_with_drop(dst_end))
.unwrap();
// iteration succeeded, don't drop head
let dst = mem::ManuallyDrop::new(sink).dst;
let dst = ManuallyDrop::new(sink).dst;
let src = unsafe { iterator.as_inner().as_into_iter() };
// check if SourceIter contract was upheld