Skip to content

Commit

Permalink
AsMut
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jul 13, 2024
1 parent 812cf9e commit 445142f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/swc_allocator/src/boxed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ impl<T: ?Sized> AsRef<T> for Box<T> {
}
}

impl<T: ?Sized> AsMut<T> for Box<T> {
fn as_mut(&mut self) -> &mut T {
&mut self.0
}
}

impl<T: ?Sized> Deref for Box<T> {
type Target = T;

Expand Down

0 comments on commit 445142f

Please sign in to comment.