Skip to content

Commit

Permalink
incrementalmerkletree: Remove std from default features.
Browse files Browse the repository at this point in the history
`std` was actually only ever required for `test-dependencies`, which is
not in `default`.
  • Loading branch information
nuttycom committed Jan 28, 2025
1 parent 32fe37e commit 65db41c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion incrementalmerkletree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ rand_core = "0.6"
rand_chacha = "0.3"

[features]
default = ["std"]
# The `std` feature is no longer enabled by default because it is not needed
# for backwards compatibility; it is only enabled by the `test-dependencies`
# feature.
std = []
# The legacy-api feature guards types and functions that were previously
# part of the `zcash_primitives` crate. Those types were removed in the
Expand Down
5 changes: 3 additions & 2 deletions incrementalmerkletree/src/frontier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ pub mod testing {
use proptest::prelude::*;
use rand::{distributions::Standard, prelude::Distribution};

use std::collections::hash_map::DefaultHasher;
use std::hash::Hasher;
#[cfg(feature = "std")]
use {core::hash::Hasher, std::collections::hash_map::DefaultHasher};

use crate::{frontier::Frontier, Hashable, Level};

Expand All @@ -701,6 +701,7 @@ pub mod testing {
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct TestNode(pub u64);

#[cfg(feature = "std")]
impl Hashable for TestNode {
fn empty_leaf() -> Self {
Self(0)
Expand Down

0 comments on commit 65db41c

Please sign in to comment.