Remove doccomments from ScriptPubKeyBufExt fn impls
What changed, and why it matters
This commit only removes five documentation comments from the implementation of a Rust trait. The actual code behavior does not change; only the source-code comments are deleted because the documentation is already rendered from the trait definition. There is no security relevance.
No action needed; this is a non-functional documentation cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff deletes /// doc comments from the impl ScriptPubKeyBufExt for ScriptPubKeyBuf block in addresses/src/lib.rs. The functions new_p2pk, new_p2tr, new_p2tr_tweaked, and new_witness_program lose their per-impl doc comments. No executable code, signatures, logic, or feature gates are modified. This is a documentation cleanup.
Changed components
addresses/src/lib.rs documentation comments onlyInspect captured patch +0 / −5
diff --git a/addresses/src/lib.rs b/addresses/src/lib.rs
index 8fe1de01..8f07f860 100644
--- a/addresses/src/lib.rs
+++ b/addresses/src/lib.rs
@@ -73,7 +73,6 @@ pub trait ScriptPubKeyBufExt: sealed::Sealed {
#[cfg(feature = "alloc")]
impl ScriptPubKeyBufExt for ScriptPubKeyBuf {
- /// Generates P2PK-type of scriptPubkey.
fn new_p2pk(pubkey: LegacyPublicKey) -> Self {
Builder::new()
.push_slice(pubkey.serialize())
@@ -91,8 +90,6 @@ impl ScriptPubKeyBufExt for ScriptPubKeyBuf {
.into_script()
}
- /// Generates P2TR for script spending path using an internal public key and some optional
- /// script tree Merkle root.
fn new_p2tr<K: Into<UntweakedPublicKey>>(
internal_key: K,
merkle_root: Option<TapNodeHash>,
@@ -103,13 +100,11 @@ impl ScriptPubKeyBufExt for ScriptPubKeyBuf {
new_witness_program_unchecked(WitnessVersion::V1, output_key.serialize())
}
- /// Generates P2TR for key spending path for a known [`TweakedPublicKey`].
fn new_p2tr_tweaked(output_key: TweakedPublicKey) -> Self {
// output key is 32 bytes long, so it's safe to use `new_witness_program_unchecked` (Segwitv1)
new_witness_program_unchecked(WitnessVersion::V1, output_key.serialize())
}
- /// Generates P2WSH-type of scriptPubkey with a given [`WitnessProgram`].
fn new_witness_program(witness_program: &WitnessProgram) -> Self {
Builder::new()
.push_opcode(witness_program.version().into())
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.