Fix typos in arena comments
This commit is contained in:
parent
da64d07191
commit
99320b9404
1 changed files with 2 additions and 2 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue