mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
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:
parent
262b2ed1ce
commit
adb50398b8
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue