refactor(allocator): add impl GetAddress for Address (#6891)

This allows passing an `Address` to methods like `StatementInjectorStore::insert_before` if you want to.
This commit is contained in:
overlookmotel 2024-10-25 15:20:21 +00:00
parent 262b2ed1ce
commit adb50398b8

View file

@ -43,3 +43,11 @@ impl<'a, T> GetAddress for Box<'a, T> {
Address::from_ptr(ptr::addr_of!(**self))
}
}
impl GetAddress for Address {
/// Address of an `Address` is itself.
#[inline]
fn address(&self) -> Address {
*self
}
}