1
Fork 0

use the new Box methods in the interpreter

This commit is contained in:
Ralf Jung 2024-08-14 14:32:17 +02:00
parent 6eaf531432
commit 58dcd1c2e6
2 changed files with 3 additions and 4 deletions

View file

@ -62,13 +62,11 @@ impl AllocBytes for Box<[u8]> {
}
fn as_mut_ptr(&mut self) -> *mut u8 {
// Carefully avoiding any intermediate references.
ptr::addr_of_mut!(**self).cast()
Box::as_mut_ptr(self).cast()
}
fn as_ptr(&self) -> *const u8 {
// Carefully avoiding any intermediate references.
ptr::addr_of!(**self).cast()
Box::as_ptr(self).cast()
}
}