Fix typos in arena comments

This commit is contained in:
Dániel Buga 2020-10-27 18:14:21 +01:00
parent da64d07191
commit 99320b9404

View File

@ -533,7 +533,7 @@ impl DropArena {
ptr::write(mem, object);
let result = &mut *mem;
// Record the destructor after doing the allocation as that may panic
// and would cause `object`'s destuctor to run twice if it was recorded before
// and would cause `object`'s destructor to run twice if it was recorded before
self.destructors
.borrow_mut()
.push(DropType { drop_fn: drop_for_type::<T>, obj: result as *mut T as *mut u8 });
@ -560,7 +560,7 @@ impl DropArena {
mem::forget(vec.drain(..));
// Record the destructors after doing the allocation as that may panic
// and would cause `object`'s destuctor to run twice if it was recorded before
// and would cause `object`'s destructor to run twice if it was recorded before
for i in 0..len {
destructors.push(DropType {
drop_fn: drop_for_type::<T>,