Removed from_vm_export in favor of from_vm_extern

This commit is contained in:
ptitSeb
2022-08-19 12:15:55 +02:00
parent 85a697f7cc
commit 6cf99a63f6
4 changed files with 10 additions and 14 deletions

View File

@@ -62,9 +62,8 @@ impl Memory {
/// Create a memory object from an existing memory and attaches it to the store
pub fn new_from_existing(new_store: &mut impl AsStoreMut, memory: VMMemory) -> Self {
Self {
handle: StoreHandle::new(new_store.objects_mut(), memory),
}
let handle = StoreHandle::new(new_store.objects_mut(), memory);
Self::from_vm_extern(new_store, handle.internal_handle())
}
/// Returns the [`MemoryType`] of the `Memory`.