mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 21:38:39 +00:00
Apply suggestions from code review
Co-authored-by: Ivan Enderlin <ivan@mnt.io>
This commit is contained in:
@@ -45,7 +45,6 @@ impl From<ExportError> for HostEnvInitError {
|
||||
/// #[wasmer(export(optional = true, alias = "memory2", alias = "_memory2"))]
|
||||
/// optional_memory: LazyInit<Memory>,
|
||||
/// }
|
||||
///
|
||||
/// ```
|
||||
///
|
||||
/// When deriving `WasmerEnv`, you must wrap your types to be initialized in
|
||||
@@ -82,7 +81,6 @@ impl From<ExportError> for HostEnvInitError {
|
||||
/// When implementing the trait manually, it's important to get a "weak" export to
|
||||
/// prevent a cyclic reference leaking memory. You can access a "weak" export with
|
||||
/// a method like `get_with_generics_weak`.
|
||||
|
||||
pub trait WasmerEnv {
|
||||
// TODO: Had to not use Clone here
|
||||
// pub trait WasmerEnv: Clone + Send + Sync {
|
||||
|
||||
@@ -7,8 +7,7 @@ use js_sys::WebAssembly::{Memory, Table};
|
||||
use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
use std::sync::Arc;
|
||||
use wasm_bindgen::JsCast;
|
||||
use wasm_bindgen::JsValue;
|
||||
use wasm_bindgen::{JsCast, JsValue};
|
||||
use wasmer_types::{ExternType, FunctionType, GlobalType, MemoryType, TableType};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
||||
@@ -11,12 +11,12 @@ use std::fmt;
|
||||
///
|
||||
/// Spec: <https://webassembly.github.io/spec/core/exec/runtime.html#store>
|
||||
#[derive(Clone)]
|
||||
pub struct Store {}
|
||||
pub struct Store;
|
||||
|
||||
impl Store {
|
||||
/// Creates a new `Store`.
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
Self
|
||||
}
|
||||
|
||||
/// Checks whether two stores are identical. A store is considered
|
||||
|
||||
Reference in New Issue
Block a user