Skip to content

Commit e321c44

Browse files
authored
Merge pull request #123 from alexanderwiederin/fix-doc-warnings
Feat(docs): add CI job to check for documentation warnings
2 parents c5b5dd9 + 08da898 commit e321c44

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ jobs:
7272
- name: Check formatting
7373
run: cargo fmt -- --check
7474

75+
- name: Check documentation
76+
env:
77+
RUSTDOCFLAGS: "-D warnings"
78+
run: cargo doc --no-deps --all-features --document-private-items
79+
7580
- name: Install llvm-tools for coverage
7681
run: rustup component add llvm-tools-preview
7782

src/core/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub trait BlockHashExt: AsPtr<btck_BlockHash> + Display {
185185
/// - **Display byte order**: Reversed for human-readable hex strings
186186
///
187187
/// The [`to_bytes`](BlockHashExt::to_bytes) method returns internal byte order,
188-
/// while [`Display`](std::fmt::Display) formatting shows the reversed bytes.
188+
/// while [`Display`] formatting shows the reversed bytes.
189189
///
190190
/// # Thread Safety
191191
///

src/core/script.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! This module provides types for working with script pubkeys (also known as
44
//! "locking scripts"), which define the conditions that must be met to spend a
5-
//! [`TxOut`].
5+
//! [`crate::TxOut`].
66
//!
77
//! # Types
88
//!
@@ -86,14 +86,14 @@ pub trait ScriptPubkeyExt: AsPtr<btck_ScriptPubkey> {
8686
}
8787
}
8888

89-
/// A single script pubkey containing spending conditions for a [`TxOut`].
89+
/// A single script pubkey containing spending conditions for a [`crate::TxOut`].
9090
///
9191
/// Script pubkeys define the conditions that must be met to spend a transaction output.
9292
/// They are also called "locking scripts" because they lock the output to specific
9393
/// spending conditions.
9494
///
9595
/// Script pubkeys can be created from raw script bytes or retrieved from an existing
96-
/// [`TxOut`].
96+
/// [`crate::TxOut`].
9797
///
9898
/// # Examples
9999
///

src/core/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ pub trait TxidExt: AsPtr<btck_Txid> + Display {
14301430
/// - **Display byte order**: Reversed for human-readable hex strings
14311431
///
14321432
/// The [`to_bytes`](TxidExt::to_bytes) method returns internal byte order,
1433-
/// while [`Display`](std::fmt::Display) formatting shows the reversed bytes.
1433+
/// while [`Display`] formatting shows the reversed bytes.
14341434
///
14351435
/// # Thread Safety
14361436
///

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub mod state;
2929
/// Serializes data using a C callback function pattern.
3030
///
3131
/// Takes a C function that writes data via a callback and returns the
32-
/// serialized bytes as a Vec<u8>.
32+
/// serialized bytes as a `Vec<u8>`.
3333
fn c_serialize<F>(c_function: F) -> Result<Vec<u8>, KernelError>
3434
where
3535
F: FnOnce(

src/state/chainstate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub enum ProcessBlockResult {
6262
/// Block failed validation.
6363
///
6464
/// The block violated one or more consensus rules. See
65-
/// [`ContextBuilder::with_block_checked_validation`] for retrieving
65+
/// [`crate::ContextBuilder::with_block_checked_validation`] for retrieving
6666
/// detailed error information.
6767
Rejected,
6868
}

0 commit comments

Comments
 (0)