What changed, and why it matters
This commit fixes two spelling/grammar mistakes in code comments ('its' to 'it's' and 'is' to 'if'). No program logic, behavior, or security properties are changed.
No security action needed. Treat as a routine documentation cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies only documentation comments in bitcoin/src/blockdata/script/borrowed.rs. Two typos are corrected in docstrings for is_p2pk() and last_opcode(). No executable code, signatures, parsing, validation, or cryptographic routines are touched.
Changed components
bitcoin/src/blockdata/script/borrowed.rs (documentation comments only)Inspect captured patch +2 / −2
diff --git a/bitcoin/src/blockdata/script/borrowed.rs b/bitcoin/src/blockdata/script/borrowed.rs
index 6cfcf4d8..7433b670 100644
--- a/bitcoin/src/blockdata/script/borrowed.rs
+++ b/bitcoin/src/blockdata/script/borrowed.rs
@@ -297,7 +297,7 @@ internal_macros::define_extension_trait! {
pub trait ScriptPubKeyExt impl for ScriptPubKey {
/// Checks whether a script pubkey is a P2PK output.
///
- /// You can obtain the public key, if its valid,
+ /// You can obtain the public key, if it's valid,
/// by calling [`p2pk_public_key()`](Self::p2pk_public_key)
fn is_p2pk(&self) -> bool { self.p2pk_pubkey_bytes().is_some() }
@@ -516,7 +516,7 @@ internal_macros::define_extension_trait! {
/// Iterates the script to find the last opcode.
///
- /// Returns `None` is the instruction is data push or if the script is empty.
+ /// Returns `None` if the instruction is data push or if the script is empty.
fn last_opcode(&self) -> Option<Opcode> {
match self.instructions().last() {
Some(Ok(Instruction::Op(op))) => Some(op),
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.