From 6f4eb609367918220f91b7b1f89241e488d17f5c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 3 Mar 2025 13:28:01 +1100 Subject: [PATCH 1/5] Improve docs crate headings I took a look at the rendered HMTL of `bitcoin`, `primitives`, `units`, `serde`, and `tokio` and picked a header style that I thought looked good. Use it for `primitives` and `units`. --- primitives/src/lib.rs | 2 +- units/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 451a3c166..f73a7ce17 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 -//! # Rust Bitcoin - primitive types. +//! # Rust Bitcoin - primitive types //! //! Primitive data types that are used throughout the [`rust-bitcoin`] ecosystem. //! diff --git a/units/src/lib.rs b/units/src/lib.rs index 4d3be98ac..5a9742986 100644 --- a/units/src/lib.rs +++ b/units/src/lib.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 -//! Rust Bitcoin units library +//! # Rust Bitcoin - unit types //! //! This library provides basic types used by the Rust Bitcoin ecosystem. From c466554948734be20559fb3b31bc1d9200f8598a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 3 Mar 2025 13:29:19 +1100 Subject: [PATCH 2/5] hashes: Improve crate docs heading Use same for as the other crates and emphasise that this is a Bitcoin hashes crate. --- hashes/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index 2b8d5924c..06cfbcda3 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 -//! Rust hashes library. +//! # Rust Bitcoin Hashes Library //! //! This library implements the hash functions needed by Bitcoin. As an ancillary thing, it exposes //! hexadecimal serialization and deserialization, since these are needed to display hashes. From d4417f96669585201b7a69f4418f259e0d7b4062 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 3 Mar 2025 13:30:52 +1100 Subject: [PATCH 3/5] io: Improve crate docs heading Use the same format as the other crates. --- io/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/src/lib.rs b/io/src/lib.rs index 3c020d0b4..0b7ee5093 100644 --- a/io/src/lib.rs +++ b/io/src/lib.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC0-1.0 -//! Rust-Bitcoin I/O Library +//! # Rust Bitcoin I/O Library //! //! The [`std::io`] module is not exposed in `no-std` Rust so building `no-std` applications which //! require reading and writing objects via standard traits is not generally possible. Thus, this From 4451724d31f2ef5388f06728ca28b804c00322b5 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 3 Mar 2025 13:32:15 +1100 Subject: [PATCH 4/5] chacha20: Add a docs heading Like we do for the other crates add a heading to the crate docs. --- chacha20_poly1305/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chacha20_poly1305/src/lib.rs b/chacha20_poly1305/src/lib.rs index 42b2df3af..16c82a9ca 100644 --- a/chacha20_poly1305/src/lib.rs +++ b/chacha20_poly1305/src/lib.rs @@ -1,5 +1,7 @@ // SPDX-License-Identifier: CC0-1.0 +//! # ChaCha20 - Poly1305 +//! //! Combine the ChaCha20 stream cipher with the Poly1305 message authentication code //! to form an authenticated encryption with additional data (AEAD) algorithm. #![no_std] From 83d071e54be0bc4ebd760a490a3ca887c0bf90a8 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 3 Mar 2025 13:33:19 +1100 Subject: [PATCH 5/5] chacha20: Add whitespace Mirror the other crates. Whitespace only. --- chacha20_poly1305/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/chacha20_poly1305/src/lib.rs b/chacha20_poly1305/src/lib.rs index 16c82a9ca..0deea843d 100644 --- a/chacha20_poly1305/src/lib.rs +++ b/chacha20_poly1305/src/lib.rs @@ -4,6 +4,7 @@ //! //! Combine the ChaCha20 stream cipher with the Poly1305 message authentication code //! to form an authenticated encryption with additional data (AEAD) algorithm. + #![no_std] // Experimental features we need. #![cfg_attr(docsrs, feature(doc_auto_cfg))]