From 05931cc0fa98564441ea0a6aff47d520fff00d89 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 24 Jun 2024 16:13:19 +1000 Subject: [PATCH 1/4] Run the formatter --- bitcoin/src/blockdata/script/push_bytes.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bitcoin/src/blockdata/script/push_bytes.rs b/bitcoin/src/blockdata/script/push_bytes.rs index e52bb905b..fddda74ee 100644 --- a/bitcoin/src/blockdata/script/push_bytes.rs +++ b/bitcoin/src/blockdata/script/push_bytes.rs @@ -4,10 +4,9 @@ use core::ops::{Deref, DerefMut}; -use crate::script; - #[allow(unused)] use crate::prelude::*; +use crate::script; #[rustfmt::skip] // Keep public re-exports separate. #[doc(inline)] From a2a9f193fee902952046b90bcf16938479d9522b Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 24 Jun 2024 15:01:28 +1000 Subject: [PATCH 2/4] Put workspace crates in alphabetical order As we create more crates the workspace list gets messier, put them in alphabetic order. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7cf9a0f32..991d67927 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["bitcoin", "hashes", "internals", "fuzz", "io", "units", "base58"] +members = ["base58", "bitcoin", "fuzz", "hashes", "internals", "io", "units"] resolver = "2" [patch.crates-io.base58ck] From 5bd3387c1596008d153cf10b5400e76e4d8b5035 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 24 Jun 2024 15:39:09 +1000 Subject: [PATCH 3/4] Move package metadata to be underneath package section The package metatadata never changes and is not necessary to look at basically ever, put it down the bottom of the manifest out of the way. Helps to keep features and dependencies closer together. Refactor only, no logic changes. --- base58/Cargo.toml | 8 ++++---- bitcoin/Cargo.toml | 8 ++++---- hashes/Cargo.toml | 8 ++++---- internals/Cargo.toml | 8 ++++---- units/Cargo.toml | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/base58/Cargo.toml b/base58/Cargo.toml index 681fb032d..c6a57da89 100644 --- a/base58/Cargo.toml +++ b/base58/Cargo.toml @@ -16,10 +16,6 @@ exclude = ["tests", "contrib"] default = ["std"] std = ["hashes/std", "internals/std"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] hashes = { package = "bitcoin_hashes", version = "0.14.0", default-features = false, features = ["alloc"] } internals = { package = "bitcoin-internals", version = "0.3.0", features = ["alloc"] } @@ -27,5 +23,9 @@ internals = { package = "bitcoin-internals", version = "0.3.0", features = ["all [dev-dependencies] hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] } +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [lints.rust] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(fuzzing)', 'cfg(kani)' ] } diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index 7c63520b0..1344571fa 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -23,10 +23,6 @@ secp-lowmemory = ["secp256k1/lowmemory"] secp-recovery = ["secp256k1/recovery"] bitcoinconsensus-std = ["bitcoinconsensus/std", "std"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] base58 = { package = "base58ck", version = "0.1.0", default-features = false } bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] } @@ -54,6 +50,10 @@ hex_lit = "0.1.1" [target.'cfg(mutate)'.dev-dependencies] mutagen = { git = "https://github.com/llogiq/mutagen" } +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [[example]] name = "bip32" diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index 1368c8eec..5f75494c2 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -22,10 +22,6 @@ io = ["bitcoin-io"] # Smaller (but slower) implementation of sha256, sha512 and ripemd160 small-hash = [] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] hex = { package = "hex-conservative", version = "0.2.0", default-features = false } @@ -37,5 +33,9 @@ serde = { version = "1.0", default-features = false, optional = true } serde_test = "1.0" serde_json = "1.0" +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [lints.rust] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(bench)', 'cfg(hashes_fuzz)', 'cfg(rust_v_1_64)' ] } diff --git a/internals/Cargo.toml b/internals/Cargo.toml index 9f8f3d5e7..20cdaadd8 100644 --- a/internals/Cargo.toml +++ b/internals/Cargo.toml @@ -18,14 +18,14 @@ default = [] std = ["alloc"] alloc = [] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] serde = { version = "1.0.103", default-features = false, optional = true } [dev-dependencies] +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [lints.rust] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(rust_v_1_64)', 'cfg(rust_v_1_61)'] } diff --git a/units/Cargo.toml b/units/Cargo.toml index afb1ab1ac..6da54ff95 100644 --- a/units/Cargo.toml +++ b/units/Cargo.toml @@ -17,10 +17,6 @@ default = ["std"] std = ["alloc", "internals/std"] alloc = ["internals/alloc"] -[package.metadata.docs.rs] -all-features = true -rustdoc-args = ["--cfg", "docsrs"] - [dependencies] internals = { package = "bitcoin-internals", version = "0.3.0", features = ["alloc"] } @@ -30,5 +26,9 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"], serde_test = "1.0" serde_json = "1.0" +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + [lints.rust] unexpected_cfgs = { level = "deny", check-cfg = ['cfg(kani)'] } From bc25ed35d51e3c2173f150a8539e31bd1cb3c9af Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 24 Jun 2024 15:47:39 +1000 Subject: [PATCH 4/4] Order serde feature list alphabetically Do minor refactor to put the list of enables in alphabetic order. Done in preparation for adding the `primitives` crate. --- bitcoin/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index 1344571fa..314829cda 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -18,7 +18,7 @@ default = [ "std", "secp-recovery" ] std = ["base58/std", "bech32/std", "hashes/std", "hex/std", "internals/std", "io/std", "secp256k1/std", "units/std"] rand-std = ["secp256k1/rand-std", "std"] rand = ["secp256k1/rand"] -serde = ["actual-serde", "hashes/serde", "secp256k1/serde", "internals/serde", "units/serde"] +serde = ["actual-serde", "hashes/serde", "internals/serde", "secp256k1/serde", "units/serde"] secp-lowmemory = ["secp256k1/lowmemory"] secp-recovery = ["secp256k1/recovery"] bitcoinconsensus-std = ["bitcoinconsensus/std", "std"]