diff --git a/Cargo.toml b/Cargo.toml index 6c1d87c..8b96eb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ exclude = [ "/res/*", "/tests/*", "/fuzz/*", "/benches/*" ] [dependencies] wasmi-validation = { version = "0.1", path = "validation", default-features = false } parity-wasm = { version = "0.31", default-features = false } -hashbrown = { version = "0.1.8", optional = true } +hashbrown = "0.4.0" memory_units = "0.3.0" libm = { version = "0.1.2", optional = true } @@ -30,7 +30,6 @@ std = [ "wasmi-validation/std", ] # Enable for no_std support -# hashbrown only works on no_std core = [ "wasmi-validation/core", "hashbrown/nightly", diff --git a/src/imports.rs b/src/imports.rs index 5cd72eb..e2d141f 100644 --- a/src/imports.rs +++ b/src/imports.rs @@ -1,10 +1,7 @@ #[allow(unused_imports)] use alloc::prelude::v1::*; -#[cfg(not(feature = "std"))] use hashbrown::HashMap; -#[cfg(feature = "std")] -use std::collections::HashMap; use func::FuncRef; use global::GlobalRef; diff --git a/src/lib.rs b/src/lib.rs index 70efe4c..3f340e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,7 +114,6 @@ extern crate assert_matches; #[cfg(test)] extern crate wabt; -#[cfg(not(feature = "std"))] extern crate hashbrown; extern crate memory_units as memory_units_crate; extern crate parity_wasm; diff --git a/src/module.rs b/src/module.rs index c3b30e2..f631ba0 100644 --- a/src/module.rs +++ b/src/module.rs @@ -5,10 +5,7 @@ use core::cell::RefCell; use core::fmt; use Trap; -#[cfg(not(feature = "std"))] use hashbrown::HashMap; -#[cfg(feature = "std")] -use std::collections::HashMap; use core::cell::Ref; use func::{FuncBody, FuncInstance, FuncRef}; diff --git a/validation/Cargo.toml b/validation/Cargo.toml index e4595c2..f326cad 100644 --- a/validation/Cargo.toml +++ b/validation/Cargo.toml @@ -9,7 +9,7 @@ description = "Wasm code validator" [dependencies] parity-wasm = { version = "0.31", default-features = false } -hashbrown = { version = "0.1.8", optional = true } +hashbrown = "0.4.0" [dev-dependencies] assert_matches = "1.1" diff --git a/validation/src/lib.rs b/validation/src/lib.rs index 8a562a6..92712fe 100644 --- a/validation/src/lib.rs +++ b/validation/src/lib.rs @@ -27,10 +27,7 @@ use core::fmt; #[cfg(feature = "std")] use std::error; -#[cfg(not(feature = "std"))] use hashbrown::HashSet; -#[cfg(feature = "std")] -use std::collections::HashSet; use self::context::ModuleContextBuilder; use parity_wasm::elements::{