diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07434207..e2d5f7d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,11 @@ jobs: - name: Check formatting run: cargo fmt -- --check + - name: Check documentation + env: + RUSTDOCFLAGS: "-D warnings" + run: cargo doc --no-deps --all-features --document-private-items + - name: Install llvm-tools for coverage run: rustup component add llvm-tools-preview diff --git a/src/core/block.rs b/src/core/block.rs index 896186e4..bb338d24 100644 --- a/src/core/block.rs +++ b/src/core/block.rs @@ -185,7 +185,7 @@ pub trait BlockHashExt: AsPtr + Display { /// - **Display byte order**: Reversed for human-readable hex strings /// /// The [`to_bytes`](BlockHashExt::to_bytes) method returns internal byte order, -/// while [`Display`](std::fmt::Display) formatting shows the reversed bytes. +/// while [`Display`] formatting shows the reversed bytes. /// /// # Thread Safety /// diff --git a/src/core/script.rs b/src/core/script.rs index 87f9c21d..2eb3e4b1 100644 --- a/src/core/script.rs +++ b/src/core/script.rs @@ -2,7 +2,7 @@ //! //! This module provides types for working with script pubkeys (also known as //! "locking scripts"), which define the conditions that must be met to spend a -//! [`TxOut`]. +//! [`crate::TxOut`]. //! //! # Types //! @@ -86,14 +86,14 @@ pub trait ScriptPubkeyExt: AsPtr { } } -/// A single script pubkey containing spending conditions for a [`TxOut`]. +/// A single script pubkey containing spending conditions for a [`crate::TxOut`]. /// /// Script pubkeys define the conditions that must be met to spend a transaction output. /// They are also called "locking scripts" because they lock the output to specific /// spending conditions. /// /// Script pubkeys can be created from raw script bytes or retrieved from an existing -/// [`TxOut`]. +/// [`crate::TxOut`]. /// /// # Examples /// diff --git a/src/core/transaction.rs b/src/core/transaction.rs index e8c6fd2e..be348fae 100644 --- a/src/core/transaction.rs +++ b/src/core/transaction.rs @@ -1430,7 +1430,7 @@ pub trait TxidExt: AsPtr + Display { /// - **Display byte order**: Reversed for human-readable hex strings /// /// The [`to_bytes`](TxidExt::to_bytes) method returns internal byte order, -/// while [`Display`](std::fmt::Display) formatting shows the reversed bytes. +/// while [`Display`] formatting shows the reversed bytes. /// /// # Thread Safety /// diff --git a/src/lib.rs b/src/lib.rs index b15eedbc..6d52e0f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,7 +29,7 @@ pub mod state; /// Serializes data using a C callback function pattern. /// /// Takes a C function that writes data via a callback and returns the -/// serialized bytes as a Vec. +/// serialized bytes as a `Vec`. fn c_serialize(c_function: F) -> Result, KernelError> where F: FnOnce( diff --git a/src/state/chainstate.rs b/src/state/chainstate.rs index 9c5160ee..43be8f66 100644 --- a/src/state/chainstate.rs +++ b/src/state/chainstate.rs @@ -62,7 +62,7 @@ pub enum ProcessBlockResult { /// Block failed validation. /// /// The block violated one or more consensus rules. See - /// [`ContextBuilder::with_block_checked_validation`] for retrieving + /// [`crate::ContextBuilder::with_block_checked_validation`] for retrieving /// detailed error information. Rejected, }