remove redundant code

This commit is contained in:
The8472 2019-11-23 14:30:10 +01:00
parent cc67c8eb91
commit 8c816b96dd

View File

@ -2386,13 +2386,7 @@ where
{
fn spec_extend(&mut self, iterator: slice::Iter<'a, T>) {
let slice = iterator.as_slice();
self.reserve(slice.len());
unsafe {
let len = self.len();
let dst_slice = slice::from_raw_parts_mut(self.as_mut_ptr().add(len), slice.len());
dst_slice.copy_from_slice(slice);
self.set_len(len + slice.len());
}
unsafe { self.append_elements(slice) };
}
}