|
|
@ -156,6 +156,7 @@ impl<T> VecExt<T> for Vec<T>
|
|
|
|
Err(e) => {
|
|
|
|
Err(e) => {
|
|
|
|
// memory at (location+sent)..slen is now invalid, move the old one back before allowing unwind to contine
|
|
|
|
// memory at (location+sent)..slen is now invalid, move the old one back before allowing unwind to contine
|
|
|
|
libc::memmove(this.add(sent) as *mut libc::c_void, this.add(slen) as *mut libc::c_void, rest);
|
|
|
|
libc::memmove(this.add(sent) as *mut libc::c_void, this.add(slen) as *mut libc::c_void, rest);
|
|
|
|
|
|
|
|
self.set_len(len + sent);
|
|
|
|
std::panic::resume_unwind(e)
|
|
|
|
std::panic::resume_unwind(e)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
_ => (),
|
|
|
|
_ => (),
|
|
|
|