Skip to content

Commit

Permalink
imp: in fixed-hash allow opting out rand when std enabled (#804)
Browse files Browse the repository at this point in the history
* imp: fixed-hash allow opting out rand when std enabled

* Update fixed-hash/Cargo.toml

* fix: cargo test --no-default-features

* Update fixed-hash/Cargo.toml

Co-authored-by: Bastian Köcher <git@kchr.de>

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: ordian <write@reusable.software>
  • Loading branch information
3 people committed Dec 5, 2023
1 parent 8384f5f commit 8723455
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fixed-hash/Cargo.toml
Expand Up @@ -9,7 +9,7 @@ description = "Macros to define custom fixed-size hash types"
documentation = "https://docs.rs/fixed-hash/"
readme = "README.md"
edition = "2021"
rust-version = "1.56.1"
rust-version = "1.60"

[package.metadata.docs.rs]
features = ["quickcheck", "api-dummy"]
Expand All @@ -29,7 +29,7 @@ rand = { version = "0.8.0", default-features = false, features = ["std_rng"] }

[features]
default = ["std", "rand", "rustc-hex", "byteorder"]
std = ["rustc-hex/std", "rand/std", "byteorder/std"]
std = ["rustc-hex/std", "rand?/std", "byteorder/std"]

api-dummy = [] # Feature used by docs.rs to display documentation of hash types

Expand Down
3 changes: 2 additions & 1 deletion primitive-types/Cargo.toml
Expand Up @@ -24,8 +24,9 @@ serde_json = { version = "1.0", default-features = false }
jsonschema = { version = "0.17", default-features = false }

[features]
default = ["std"]
default = ["std", "rand"]
std = ["uint/std", "fixed-hash/std", "impl-codec?/std"]
rand = ["fixed-hash/rand"]
byteorder = ["fixed-hash/byteorder"]
rustc-hex = ["fixed-hash/rustc-hex"]
serde = ["std", "impl-serde", "impl-serde/std"]
Expand Down

0 comments on commit 8723455

Please sign in to comment.