remove redundant code
This commit is contained in:
parent
cc67c8eb91
commit
8c816b96dd
@ -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) };
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user