docs: update deprecated hash_types::Txid imports to direct Txid imports
What changed, and why it matters
This is a documentation-only change that updates two import statements in code examples and tests from a deprecated module path to the current direct path. It does not alter any runtime behavior or security logic.
No action required. This is a non-security documentation/test import cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit replaces bitcoin::hash_types::Txid with bitcoin::Txid and crate::hash_types::Txid with crate::Txid in a doc comment example and in test code within bitcoin/src/merkle_tree/block.rs. The change is purely cosmetic/import-path cleanup and has no functional effect on the library.
Changed components
bitcoin/src/merkle_tree/block.rsInspect captured patch +2 / −2
diff --git a/bitcoin/src/merkle_tree/block.rs b/bitcoin/src/merkle_tree/block.rs
index 005e66db..580923c3 100644
--- a/bitcoin/src/merkle_tree/block.rs
+++ b/bitcoin/src/merkle_tree/block.rs
@@ -201,7 +201,7 @@ impl PartialMerkleTree {
/// # Examples
///
/// ```rust
- /// use bitcoin::hash_types::Txid;
+ /// use bitcoin::Txid;
/// use bitcoin::merkle_tree::PartialMerkleTree;
///
/// // Block 80000
@@ -540,7 +540,7 @@ mod tests {
use super::*;
use crate::block::{BlockUncheckedExt as _, Unchecked};
use crate::consensus::encode;
- use crate::hash_types::Txid;
+ use crate::Txid;
#[cfg(feature = "rand-std")]
macro_rules! pmt_tests {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.