Skip to content

Commit 7965e72

Browse files
committed
Fix rustdoc lint warnings
- Split title and body - Fix list indentation - Add whitespace
1 parent e75e7f4 commit 7965e72

File tree

8 files changed

+21
-12
lines changed

8 files changed

+21
-12
lines changed

bitcoin/src/address/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ pub enum AddressData {
319319
/// ```
320320
///
321321
/// 2. `Debug` on `Address<NetworkUnchecked>` does not produce clean address but address wrapped by
322-
/// an indicator that its network has not been checked. This is to encourage programmer to properly
323-
/// check the network and use `Display` in user-facing context.
322+
/// an indicator that its network has not been checked. This is to encourage programmer to properly
323+
/// check the network and use `Display` in user-facing context.
324324
///
325325
/// ```
326326
/// # use std::str::FromStr;

bitcoin/src/bip152.rs

+2
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ impl Decodable for ShortId {
143143
}
144144
}
145145

146+
/// A structure to relay a block header, short IDs, and a select few transactions.
147+
///
146148
/// A [HeaderAndShortIds] structure is used to relay a block header, the short
147149
/// transactions IDs used for matching already-available transactions, and a
148150
/// select few transactions which we expect a peer may be missing.

bitcoin/src/crypto/key.rs

+2
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,11 @@ impl TapTweak for UntweakedKeypair {
803803
/// * p is the internal private key
804804
/// * H is the hash function
805805
/// * c is the commitment data
806+
///
806807
/// The public key is generated from a private key by multiplying with generator point, Q = qG.
807808
///
808809
/// # Returns
810+
///
809811
/// The tweaked key and its parity.
810812
fn tap_tweak<C: Verification>(
811813
self,

bitcoin/src/crypto/sighash.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,8 @@ impl<R: Borrow<Transaction>> SighashCache<R> {
879879
/// # Warning
880880
///
881881
/// - Does NOT attempt to support OP_CODESEPARATOR. In general this would require evaluating
882-
/// `script_pubkey` to determine which separators get evaluated and which don't, which we don't
883-
/// have the information to determine.
882+
/// `script_pubkey` to determine which separators get evaluated and which don't, which we don't
883+
/// have the information to determine.
884884
/// - Does NOT handle the sighash single bug (see "Return type" section)
885885
///
886886
/// # Returns

bitcoin/src/merkle_tree/block.rs

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ impl Decodable for MerkleBlock {
191191
/// - uint256[] hashes in depth-first order (<= 32*N bytes)
192192
/// - varint number of bytes of flag bits (1-3 bytes)
193193
/// - byte[] flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits)
194+
///
194195
/// The size constraints follow from this.
195196
#[derive(PartialEq, Eq, Clone, Debug)]
196197
pub struct PartialMerkleTree {

bitcoin/src/psbt/map/input.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@ pub struct Input {
132132
pub unknown: BTreeMap<raw::Key, Vec<u8>>,
133133
}
134134

135-
/// A Signature hash type for the corresponding input. As of taproot upgrade, the signature hash
136-
/// type can be either [`EcdsaSighashType`] or [`TapSighashType`] but it is not possible to know
137-
/// directly which signature hash type the user is dealing with. Therefore, the user is responsible
138-
/// for converting to/from [`PsbtSighashType`] from/to the desired signature hash type they need.
135+
/// A Signature hash type for the corresponding input.
136+
///
137+
/// As of taproot upgrade, the signature hash type can be either [`EcdsaSighashType`] or
138+
/// [`TapSighashType`] but it is not possible to know directly which signature hash type the user is
139+
/// dealing with. Therefore, the user is responsible for converting to/from [`PsbtSighashType`]
140+
/// from/to the desired signature hash type they need.
139141
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
140142
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
141143
#[cfg_attr(feature = "serde", serde(crate = "actual_serde"))]

io/src/error.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ impl From<Error> for std::io::Error {
105105
macro_rules! define_errorkind {
106106
($($(#[$($attr:tt)*])* $kind:ident),*) => {
107107
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
108-
/// A minimal subset of [`std::io::ErrorKind`] which is used for [`Error`]. Note that, as with
109-
/// [`std::io`], only [`Self::Interrupted`] has defined semantics in this crate, all other
110-
/// variants are provided here only to provide higher-fidelity conversions to and from
111-
/// [`std::io::Error`].
108+
/// A minimal subset of [`std::io::ErrorKind`] which is used for [`Error`].
109+
///
110+
/// Note that, as with [`std::io`], only [`Self::Interrupted`] has defined semantics in this
111+
/// crate, all other variants are provided here only to provide higher-fidelity conversions
112+
/// to and from [`std::io::Error`].
112113
pub enum ErrorKind {
113114
$(
114115
$(#[$($attr)*])*

units/src/amount.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,7 @@ pub mod serde {
16111611
#![allow(missing_docs)]
16121612

16131613
//! This module adds serde serialization and deserialization support for Amounts.
1614+
//!
16141615
//! Since there is not a default way to serialize and deserialize Amounts, multiple
16151616
//! ways are supported and it's up to the user to decide which serialiation to use.
16161617
//! The provided modules can be used as follows:

0 commit comments

Comments
 (0)