From a0dc5c189370a0d5a5253244dc0cf72db4c0e413 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sat, 22 Jun 2024 08:28:31 -0700 Subject: [PATCH] Add cppgc::InnerMember::get_mut (#1505) --- src/cppgc.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cppgc.rs b/src/cppgc.rs index c5e8cd1f..8793d482 100644 --- a/src/cppgc.rs +++ b/src/cppgc.rs @@ -226,6 +226,10 @@ impl InnerMember { pub unsafe fn get(&self) -> &T { unsafe { self.ptr.cast::().as_ref().unwrap() } } + + pub unsafe fn get_mut(&mut self) -> &mut T { + unsafe { self.ptr.cast::().as_mut().unwrap() } + } } /// Members are used to contain strong pointers to other garbage