mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Add get_mut
to WasmRefCell
This commit is contained in:
parent
44a9555313
commit
97be6d35ce
@ -113,6 +113,12 @@ pub mod __rt {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_mut(&mut self) -> &mut T {
|
||||
unsafe {
|
||||
&mut *self.value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn borrow(&self) -> Ref<T> {
|
||||
unsafe {
|
||||
if self.borrow.get() == usize::max_value() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user