Skip to content

Commit c82b986

Browse files
committed
Fix WASM Rc/Arc/Weak usage
1 parent 0ebb7de commit c82b986

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wasm/lib/src/vm_class.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ impl WASMVirtualMachine {
179179
pub(crate) fn push_held_rc(
180180
&self,
181181
obj: PyObjectRef,
182-
) -> Result<Weak<PyObject<dyn PyObjectPayload>>, JsValue> {
182+
) -> Result<std::sync::Weak<PyObject<dyn PyObjectPayload>>, JsValue> {
183183
self.with(|stored_vm| {
184-
let weak = Rc::downgrade(&obj);
184+
let weak = std::sync::Arc::downgrade(&obj);
185185
stored_vm.held_objects.borrow_mut().push(obj);
186186
weak
187187
})

0 commit comments

Comments
 (0)