From 401684308e083d6838a4497088b7e03ac32792bc Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 6 Feb 2025 13:19:41 +1100 Subject: [PATCH 1/2] Put dep on single line Using multiple lines makes the dependency seem a bit noisy to me. Put the `minreq` build-dependency on a single line. --- node/Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/node/Cargo.toml b/node/Cargo.toml index f5d1e17a..ec45aaf8 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -27,9 +27,7 @@ env_logger = "0.9.0" bitcoin_hashes = { version = ">= 0.13, <= 0.14", optional = true } flate2 = { version = "1.0", optional = true } tar = { version = "0.4", optional = true } -minreq = { version = "2.9.1", default-features = false, features = [ - "https", -], optional = true } +minreq = { version = "2.9.1", default-features = false, features = ["https"], optional = true } zip = { version = "0.6", optional = true } anyhow = "1.0.66" From 9ead0fa4dfa4bb2045ed4551c9551a4d01f8da5e Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 6 Feb 2025 13:54:37 +1100 Subject: [PATCH 2/2] Make anyhow an optional build-dependency The `anyhow` dependency is only used if `download` is enabled, same as all the other optional `build-dependencies`. --- node/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/Cargo.toml b/node/Cargo.toml index ec45aaf8..11b7c8b4 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -24,12 +24,12 @@ serde_json = { version = "1.0.117" } env_logger = "0.9.0" [build-dependencies] +anyhow = { version = "1.0.66", optional = true } bitcoin_hashes = { version = ">= 0.13, <= 0.14", optional = true } flate2 = { version = "1.0", optional = true } tar = { version = "0.4", optional = true } minreq = { version = "2.9.1", default-features = false, features = ["https"], optional = true } zip = { version = "0.6", optional = true } -anyhow = "1.0.66" # Please note, in this crate the version features are mutally exclusive. # @@ -41,7 +41,7 @@ anyhow = "1.0.66" # path or using `BITCOIND_EXE=/path/to/bitcoind`. Note also that the feature enabled should match # the version from `bitcoind --version`. [features] -download = ["bitcoin_hashes", "flate2", "tar", "minreq", "zip"] +download = ["anyhow", "bitcoin_hashes", "flate2", "tar", "minreq", "zip"] # We support all minor releases of the latest three versions. 28_0 = ["27_2"]