Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions hash-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ license = "Apache-2.0"
categories = [ "no-std" ]
repository = "https://github.com/paritytech/trie"
edition = "2018"

[features]
default = ["std"]
std = [
]
15 changes: 2 additions & 13 deletions hash-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Debug> MaybeDebug for T {}
#[cfg(not(feature = "std"))]
pub trait MaybeDebug {}
#[cfg(not(feature = "std"))]
impl<T> MaybeDebug for T {}

/// A trie node prefix, it is the nibble path from the trie root
/// to the trie node.
Expand Down Expand Up @@ -205,7 +195,6 @@ impl<'a, H: Hasher, T> AsHashDB<H, T> for &'a mut dyn HashDB<H, T> {
}
}

#[cfg(feature = "std")]
impl<'a, K, V> AsPlainDB<K, V> for &'a mut dyn PlainDB<K, V> {
fn as_plain_db(&self) -> &dyn PlainDB<K, V> {
&**self
Expand Down
4 changes: 1 addition & 3 deletions memory-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ criterion = "0.5.1"

[features]
default = ["std"]
std = [
"hash-db/std",
]
std = []

[[bench]]
name = "bench"
Expand Down
4 changes: 1 addition & 3 deletions test-support/keccak-hasher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ hash256-std-hasher = { path = "../../hash256-std-hasher", version = "0.15.2" }

[features]
default = ["std"]
std = [
"hash-db/std",
]
std = []
1 change: 0 additions & 1 deletion trie-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ rustc-hex = { version = "2.1.0", default-features = false, optional = true }
[features]
default = ["std"]
std = [
"hash-db/std",
"rustc-hex",
]
1 change: 0 additions & 1 deletion trie-eip1186/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
4 changes: 1 addition & 3 deletions trie-root/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ hash-db = { path = "../hash-db", default-features = false, version = "0.16.0" }

[features]
default = ["std"]
std = [
"hash-db/std"
]
std = []