Fix linter

This commit is contained in:
ptitSeb
2022-08-18 16:58:04 +02:00
parent c7c1507b8b
commit f599df0240
17 changed files with 82 additions and 82 deletions

View File

@@ -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 {