mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 05:08:19 +00:00
Fix linter
This commit is contained in:
7
lib/api/src/sys/externals/memory.rs
vendored
7
lib/api/src/sys/externals/memory.rs
vendored
@@ -10,7 +10,7 @@ use std::mem::MaybeUninit;
|
||||
use std::slice;
|
||||
#[cfg(feature = "tracing")]
|
||||
use tracing::warn;
|
||||
use wasmer_types::{Pages, LinearMemory};
|
||||
use wasmer_types::{LinearMemory, Pages};
|
||||
use wasmer_vm::{InternalStoreHandle, MemoryError, StoreHandle, VMExtern, VMMemory};
|
||||
|
||||
use super::MemoryView;
|
||||
@@ -63,7 +63,7 @@ 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)
|
||||
handle: StoreHandle::new(new_store.objects_mut(), memory),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +152,7 @@ impl Memory {
|
||||
/// Attempts to clone this memory (if its clonable)
|
||||
pub fn try_clone(&self, store: &impl AsStoreRef) -> Option<VMMemory> {
|
||||
let mem = self.handle.get(store.as_store_ref().objects());
|
||||
mem.try_clone()
|
||||
.map(|mem| mem.into())
|
||||
mem.try_clone().map(|mem| mem.into())
|
||||
}
|
||||
|
||||
pub(crate) fn to_vm_extern(&self) -> VMExtern {
|
||||
|
||||
Reference in New Issue
Block a user