Disable default features of dependencies to fix no-std support

This commit is contained in:
Jack Grigg 2024-12-13 22:47:06 +00:00
parent 56a4ea7d33
commit 7238aa4e1d
6 changed files with 15 additions and 9 deletions

View File

@ -7,6 +7,9 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Fixed
- Disabled default features of dependencies to fix no-std support.
## [0.1.2] - 2024-10-22
### Added

4
Cargo.lock generated
View File

@ -39,9 +39,9 @@ checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6"
[[package]]
name = "memuse"
version = "0.2.1"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a"
checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964"
[[package]]
name = "subtle"

View File

@ -14,9 +14,9 @@ edition = "2021"
rust-version = "1.60"
[dependencies]
blake2b_simd = "1"
memuse = "0.2.1"
subtle = "2.2.3"
blake2b_simd = { version = "1", default-features = false }
memuse = { version = "0.2.2", default-features = false }
subtle = { version = "2.2.3", default-features = false }
zcash_spec = "0.1.2"
[dev-dependencies]
@ -24,4 +24,4 @@ assert_matches = "1.5"
[features]
default = ["std"]
std = []
std = ["memuse/std"]

View File

@ -257,7 +257,7 @@ mod tests {
.path
.into_iter()
.map(|i| ChildIndex::from_index(*i).expect("hardened"))
.collect::<std::vec::Vec<_>>();
.collect::<alloc::vec::Vec<_>>();
assert_eq!(&full_path[..i], &path);
// The derived master key should be identical to the key at the empty path.

View File

@ -88,8 +88,8 @@ fn test_seed_fingerprint() {
let fp = SeedFingerprint::from_seed(&tv.root_seed).expect("root_seed has valid length");
assert_eq!(&fp.to_bytes(), &tv.fingerprint[..]);
assert_eq!(
std::format!("{:?}", fp),
std::format!("SeedFingerprint({})", tv.fingerprint_str)
alloc::format!("{:?}", fp),
alloc::format!("SeedFingerprint({})", tv.fingerprint_str)
);
}
}

View File

@ -7,6 +7,9 @@
#![deny(unsafe_code)]
#![deny(rustdoc::broken_intra_doc_links)]
#[cfg(test)]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;