1
Fork 0

Replace most uses of pointer::offset with add and sub

This commit is contained in:
Maybe Waffle 2022-08-19 13:33:06 +04:00
parent 6c943bad02
commit e4720e1cf2
22 changed files with 57 additions and 57 deletions

View file

@ -217,7 +217,7 @@ impl<T> TypedArena<T> {
} else {
let ptr = self.ptr.get();
// Advance the pointer.
self.ptr.set(self.ptr.get().offset(1));
self.ptr.set(self.ptr.get().add(1));
// Write into uninitialized memory.
ptr::write(ptr, object);
&mut *ptr