From ec2a2cc1342a767f002226b0f21c24e7039cfecb Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 8 Apr 2024 06:53:08 +1000 Subject: [PATCH] Remove path dev-dependency Currently we are enabling "rand" using a path dependency in the dev-dependencies because of the benches. This is reducing coverage in CI because "std" is always enabled. Feature gate the bench that requires "rand" and remove the path dependency. --- Cargo.toml | 2 -- benches/bench.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc521ff..f4605c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,8 +53,6 @@ bitcoin_hashes = { version = ">=0.12, <=0.13", default-features = false } unicode-normalization = { version = "=0.1.22", default-features = false, optional = true } [dev-dependencies] -# Enabling the "rand" feature by default to run the benches -bip39 = { path = ".", features = ["rand"] } bitcoin_hashes = ">=0.12,<0.14" # enable default features for test diff --git a/benches/bench.rs b/benches/bench.rs index a11b129..a15926a 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -59,6 +59,7 @@ fn from_entropy(b: &mut Bencher) { }); } +#[cfg(feature = "rand")] #[bench] fn new_mnemonic(b: &mut Bencher) { b.iter(|| {