What changed, and why it matters
This commit only fixes the formatting of a documentation link. It changes 'BIP-340' to 'BIP-0340' and wraps the URL in angle brackets so it renders correctly in Rust's generated documentation. No code behavior was changed, and there is no security impact.
No security action needed. This is a cosmetic documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies rustdoc comments in bitcoin/src/crypto/sighash.rs. It renames the reference label from [BIP-340] to [BIP-0340] to match the project’s documentation style policy (4-digit zero-padded BIP numbers) and wraps the URL in angle brackets for proper rustdoc link syntax. The actual sign_key_spend and sign_script_spend function implementations are untouched.
Changed components
bitcoin/src/crypto/sighash.rs documentation onlyInspect captured patch +4 / −4
diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs
index bab0d585..391fb782 100644
--- a/bitcoin/src/crypto/sighash.rs
+++ b/bitcoin/src/crypto/sighash.rs
@@ -120,11 +120,11 @@ hashes::impl_serde_for_newtype!(TapSighash);
impl TapSighash {
/// Signs the sighash for a P2TR key-path spending transaction with the
- /// [`TweakedKeypair`] and creates a Taproot signature as defined in [BIP-340].
+ /// [`TweakedKeypair`] and creates a Taproot signature as defined in [BIP-0340].
///
/// For P2TR script-path spend use [`TapSighash::sign_script_spend`].
///
- /// [BIP-340]: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
+ /// [BIP-0340]: <https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki>
pub fn sign_key_spend(
&self,
keypair: &TweakedKeypair,
@@ -135,11 +135,11 @@ impl TapSighash {
}
/// Signs the sighash with an [`UntweakedKeypair`] without applying a tweak and creates a
- /// taproot signature as defined in [BIP-340].
+ /// taproot signature as defined in [BIP-0340].
///
/// For P2TR key spend use [`TapSighash::sign_key_spend`].
///
- /// [BIP-340]: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki
+ /// [BIP-0340]: <https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki>
pub fn sign_script_spend(
&self,
keypair: &UntweakedKeypair,
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.