Skip to content

Commit b2a8d32

Browse files
committed
Fix rustdoc warnings for HTML tags and broken links
- Wrap generic type parameters in backticks to avoid HTML tag parsing - Fix link to unlock_unspent method
1 parent ced6b34 commit b2a8d32

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

dash-spv/src/client/core.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub struct DashSpvClient<W: WalletInterface, N: NetworkManager, S: StorageManage
109109
///
110110
/// # Architectural Design
111111
///
112-
/// The sync manager is stored as a non-shared field (not wrapped in Arc<Mutex<T>>)
112+
/// The sync manager is stored as a non-shared field (not wrapped in `Arc<Mutex<T>>`)
113113
/// for the following reasons:
114114
///
115115
/// 1. **Single Owner Pattern**: The sync manager is exclusively owned by the client,
@@ -126,7 +126,7 @@ pub struct DashSpvClient<W: WalletInterface, N: NetworkManager, S: StorageManage
126126
///
127127
/// If concurrent access becomes necessary (e.g., for monitoring sync progress from
128128
/// multiple threads), consider:
129-
/// - Using interior mutability patterns (Arc<Mutex<SyncManager>>)
129+
/// - Using interior mutability patterns (`Arc<Mutex<SyncManager>>`)
130130
/// - Extracting read-only state into a separate shared structure
131131
/// - Implementing a message-passing architecture for sync commands
132132
///

dash-spv/src/client/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
//! ## Lock Ordering (CRITICAL - Prevents Deadlocks)
2424
//!
2525
//! When acquiring multiple locks, ALWAYS use this order:
26-
//! 1. running (Arc<RwLock<bool>>)
27-
//! 2. state (Arc<RwLock<ChainState>>)
28-
//! 3. stats (Arc<RwLock<SpvStats>>)
29-
//! 4. mempool_state (Arc<RwLock<MempoolState>>)
30-
//! 5. storage (Arc<Mutex<S>>)
26+
//! 1. running (`Arc<RwLock<bool>>`)
27+
//! 2. state (`Arc<RwLock<ChainState>>`)
28+
//! 3. stats (`Arc<RwLock<SpvStats>>`)
29+
//! 4. mempool_state (`Arc<RwLock<MempoolState>>`)
30+
//! 5. storage (`Arc<Mutex<S>>`)
3131
//!
3232
//! Never acquire locks in reverse order or deadlock will occur!
3333

dash-spv/src/types.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! - types/balances.rs - AddressBalance, UnconfirmedTransaction
1010
//!
1111
//! # Thread Safety
12-
//! Many types here are wrapped in Arc<RwLock> or Arc<Mutex> when used.
12+
//! Many types here are wrapped in `Arc<RwLock>` or `Arc<Mutex>` when used.
1313
//! Always acquire locks in consistent order to prevent deadlocks:
1414
//! 1. state (ChainState)
1515
//! 2. stats (SpvStats)
@@ -27,13 +27,13 @@ use std::sync::Arc;
2727

2828
/// Shared, mutex-protected set of filter heights used across components.
2929
///
30-
/// # Why Arc<Mutex<HashSet>>?
30+
/// # Why `Arc<Mutex<HashSet>>`?
3131
/// - Arc: Shared ownership between FilterSyncManager and SpvStats
3232
/// - Mutex: Interior mutability for concurrent updates from filter download tasks
3333
/// - HashSet: Fast O(1) membership testing for gap detection
3434
///
3535
/// # Performance Note
36-
/// Consider Arc<RwLock> if read contention becomes an issue (most operations are reads).
36+
/// Consider `Arc<RwLock>` if read contention becomes an issue (most operations are reads).
3737
pub type SharedFilterHeights = std::sync::Arc<tokio::sync::Mutex<std::collections::HashSet<u32>>>;
3838

3939
/// A block header with its cached hash to avoid expensive X11 recomputation.
@@ -240,7 +240,7 @@ impl DetailedSyncProgress {
240240
/// # CRITICAL: This is the heart of the SPV client's state
241241
///
242242
/// ## Thread Safety
243-
/// Almost always wrapped in Arc<RwLock<ChainState>> for shared access.
243+
/// Almost always wrapped in `Arc<RwLock<ChainState>>` for shared access.
244244
/// Multiple readers can access simultaneously, but writes are exclusive.
245245
///
246246
/// ## Checkpoint Sync

rpc-client/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ pub trait RpcApi: Sized {
671671
self.call("listunspent", handle_defaults(&mut args, &defaults))
672672
}
673673

674-
/// To unlock, use [unlock_unspent].
674+
/// To unlock, use [`Self::unlock_unspent`].
675675
fn lock_unspent(&self, outputs: &[OutPoint]) -> Result<bool> {
676676
let outputs: Vec<_> =
677677
outputs.iter().map(|o| serde_json::to_value(JsonOutPoint::from(*o)).unwrap()).collect();

0 commit comments

Comments
 (0)