mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
Fix linter
This commit is contained in:
6
lib/api/src/js/externals/memory.rs
vendored
6
lib/api/src/js/externals/memory.rs
vendored
@@ -101,7 +101,11 @@ impl Memory {
|
||||
}
|
||||
|
||||
/// Creates a new host `Memory` from provided JavaScript memory.
|
||||
pub fn new_raw(store: &mut impl AsStoreMut, js_memory: js_sys::WebAssembly::Memory, ty: MemoryType) -> Result<Self, MemoryError> {
|
||||
pub fn new_raw(
|
||||
store: &mut impl AsStoreMut,
|
||||
js_memory: js_sys::WebAssembly::Memory,
|
||||
ty: MemoryType,
|
||||
) -> Result<Self, MemoryError> {
|
||||
let vm_memory = VMMemory::new(js_memory, ty);
|
||||
Ok(Self::from_vm_export(store, vm_memory))
|
||||
}
|
||||
|
||||
@@ -182,27 +182,23 @@ impl Imports {
|
||||
}
|
||||
|
||||
pub struct ImportsIterator<'a> {
|
||||
iter: std::collections::hash_map::Iter<'a, (String, String), Extern>
|
||||
iter: std::collections::hash_map::Iter<'a, (String, String), Extern>,
|
||||
}
|
||||
|
||||
impl<'a> ImportsIterator<'a>
|
||||
{
|
||||
impl<'a> ImportsIterator<'a> {
|
||||
fn new(imports: &'a Imports) -> Self {
|
||||
let iter = imports.map.iter();
|
||||
Self { iter }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Iterator
|
||||
for ImportsIterator<'a> {
|
||||
impl<'a> Iterator for ImportsIterator<'a> {
|
||||
type Item = (&'a str, &'a str, &'a Extern);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
self.iter
|
||||
.next()
|
||||
.map(|(k, v)| {
|
||||
(k.0.as_str(), k.1.as_str(), v)
|
||||
})
|
||||
.map(|(k, v)| (k.0.as_str(), k.1.as_str(), v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ pub use crate::js::value::Value as Val;
|
||||
|
||||
pub mod vm {
|
||||
//! The `vm` module re-exports wasmer-vm types.
|
||||
|
||||
|
||||
pub use crate::js::export::VMMemory;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user