Apply suggestions from code review

Co-authored-by: Ivan Enderlin <ivan@mnt.io>
This commit is contained in:
Syrus Akbary
2021-07-14 05:55:11 -05:00
committed by GitHub
parent bfbd08871c
commit 66ff6b4729
6 changed files with 10 additions and 14 deletions

View File

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

View File

@@ -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)]

View File

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