diff --git a/hash-db/Cargo.toml b/hash-db/Cargo.toml index d0c6f104..0e60cf91 100644 --- a/hash-db/Cargo.toml +++ b/hash-db/Cargo.toml @@ -7,8 +7,3 @@ license = "Apache-2.0" categories = [ "no-std" ] repository = "https://github.com/paritytech/trie" edition = "2018" - -[features] -default = ["std"] -std = [ -] diff --git a/hash-db/src/lib.rs b/hash-db/src/lib.rs index 2ffd7d82..b9f5f30a 100644 --- a/hash-db/src/lib.rs +++ b/hash-db/src/lib.rs @@ -14,23 +14,13 @@ //! Database of byte-slices keyed to their hash. -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] -#[cfg(not(feature = "std"))] use core::hash; -#[cfg(feature = "std")] -use std::fmt::Debug; -#[cfg(feature = "std")] -use std::hash; +use core::fmt::Debug; -#[cfg(feature = "std")] pub trait MaybeDebug: Debug {} -#[cfg(feature = "std")] impl MaybeDebug for T {} -#[cfg(not(feature = "std"))] -pub trait MaybeDebug {} -#[cfg(not(feature = "std"))] -impl MaybeDebug for T {} /// A trie node prefix, it is the nibble path from the trie root /// to the trie node. @@ -205,7 +195,6 @@ impl<'a, H: Hasher, T> AsHashDB for &'a mut dyn HashDB { } } -#[cfg(feature = "std")] impl<'a, K, V> AsPlainDB for &'a mut dyn PlainDB { fn as_plain_db(&self) -> &dyn PlainDB { &**self diff --git a/memory-db/Cargo.toml b/memory-db/Cargo.toml index b8913a26..459e3c5e 100644 --- a/memory-db/Cargo.toml +++ b/memory-db/Cargo.toml @@ -18,9 +18,7 @@ criterion = "0.5.1" [features] default = ["std"] -std = [ - "hash-db/std", -] +std = [] [[bench]] name = "bench" diff --git a/test-support/keccak-hasher/Cargo.toml b/test-support/keccak-hasher/Cargo.toml index d933d44d..1408d542 100644 --- a/test-support/keccak-hasher/Cargo.toml +++ b/test-support/keccak-hasher/Cargo.toml @@ -14,6 +14,4 @@ hash256-std-hasher = { path = "../../hash256-std-hasher", version = "0.15.2" } [features] default = ["std"] -std = [ - "hash-db/std", -] +std = [] diff --git a/trie-db/Cargo.toml b/trie-db/Cargo.toml index 6b029fcb..3973db4e 100644 --- a/trie-db/Cargo.toml +++ b/trie-db/Cargo.toml @@ -16,6 +16,5 @@ rustc-hex = { version = "2.1.0", default-features = false, optional = true } [features] default = ["std"] std = [ - "hash-db/std", "rustc-hex", ] diff --git a/trie-eip1186/Cargo.toml b/trie-eip1186/Cargo.toml index 0179f638..8ca97dcd 100644 --- a/trie-eip1186/Cargo.toml +++ b/trie-eip1186/Cargo.toml @@ -15,5 +15,4 @@ hash-db = { path = "../hash-db", default-features = false, version = "0.16.0"} default = ["std"] std = [ "trie-db/std", - "hash-db/std", ] diff --git a/trie-root/Cargo.toml b/trie-root/Cargo.toml index 7a39bddd..9eb2da7e 100644 --- a/trie-root/Cargo.toml +++ b/trie-root/Cargo.toml @@ -13,6 +13,4 @@ hash-db = { path = "../hash-db", default-features = false, version = "0.16.0" } [features] default = ["std"] -std = [ - "hash-db/std" -] +std = []