mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
feat(allocator): add AsMut impl for Box (#5515)
This commit is contained in:
parent
340b535715
commit
e8bdd12438
1 changed files with 6 additions and 0 deletions
|
|
@ -70,6 +70,12 @@ impl<'alloc, T: ?Sized> AsRef<T> for Box<'alloc, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'alloc, T: ?Sized> AsMut<T> for Box<'alloc, T> {
|
||||
fn as_mut(&mut self) -> &mut T {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl<'alloc, T: ?Sized + Debug> Debug for Box<'alloc, T> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
self.deref().fmt(f)
|
||||
|
|
|
|||
Loading…
Reference in a new issue