forked from rust-bitcoin/rust-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge rust-bitcoin#4055: hashes: Only enable hex/std, and hex/alloc w…
…hen hex is 7c12d92 Only enable hex/std, alloc when hex is (Jamil Lambert, PhD) 11770ca Add hashes to io dev-depencies and require hex (Jamil Lambert, PhD) e7c6564 Add missing hex feature gate (Jamil Lambert, PhD) Pull request description: `hex/std` and `hex/alloc` should only be included if optional dependency `hex` is enabled. A bunch of tests that need `hex` relied on an `alloc` feature gate to ensure `hex/alloc` was enabled. Add feature gates to the tests that require `hex`. Add `?` so `hex/alloc` or `hex/std` are only included if the optional feature `hex` is enabled. Audit rest of crates `Cargo.toml` files: no other cases found. Close rust-bitcoin#4035 ACKs for top commit: Kixunil: ACK 7c12d92 apoelstra: ACK 7c12d92; successfully ran local tests; Played with cargo a bit; `cargo tree` seems to confirm that you can mix dev and non-dev dependencies like this. Tree-SHA512: bd752d3c074dd8c93b09aa318d98ccb761b2f9baa2797566dd1d5f486349a92fbcd05787ddeb53d1f05ef0b29fbf559152f6373674fbec01e1251e74ad61e61f
- Loading branch information
Showing
14 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,7 @@ mod tests { | |
} | ||
|
||
#[cfg(bench)] | ||
#[cfg(feature = "hex")] | ||
mod benches { | ||
use test::Bencher; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#[test] | ||
#[cfg(feature = "alloc")] | ||
#[cfg(feature = "hex")] | ||
fn test() { | ||
use alloc::string::ToString; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#[test] | ||
#[cfg(feature = "alloc")] | ||
#[cfg(feature = "hex")] | ||
fn test() { | ||
use alloc::string::ToString; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#[test] | ||
#[cfg(feature = "alloc")] | ||
#[cfg(feature = "hex")] | ||
fn test() { | ||
use alloc::string::ToString; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters