docs: fix grammatical issues in code comments
What changed, and why it matters
This commit only fixes grammar in code comments and renames a test function that had a typo in its name. There are no code behavior changes, no security fixes, and no functional patches.
No security action needed; this is a non-functional documentation cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff contains three trivial documentation/comment-only changes: correcting ‘an code audit’ to ‘a code audit’, renaming a test function from ‘script_p2sh_p2p2k_template’ to ‘script_p2sh_p2pkh_template’, and adding a missing space in a format-string macro call inside an error Display implementation. None of these alter compiled behavior or fix any vulnerability.
Changed components
bitcoin/src/blockdata/script/push_bytes.rsbitcoin/src/blockdata/script/tests.rsbitcoin/src/crypto/key.rsInspect captured patch +3 / −3
diff --git a/bitcoin/src/blockdata/script/push_bytes.rs b/bitcoin/src/blockdata/script/push_bytes.rs
index 81b41d73..5a394898 100644
--- a/bitcoin/src/blockdata/script/push_bytes.rs
+++ b/bitcoin/src/blockdata/script/push_bytes.rs
@@ -9,7 +9,7 @@ use crate::script;
#[rustfmt::skip] // Keep public re-exports separate.
#[doc(inline)]
-// This is not the usual re-export, `primitive` here is an code audit thing.
+// This is not the usual re-export, `primitive` here is a code audit thing.
pub use self::primitive::{PushBytes, PushBytesBuf};
/// This module only contains required operations so that outside functions wouldn't accidentally
diff --git a/bitcoin/src/blockdata/script/tests.rs b/bitcoin/src/blockdata/script/tests.rs
index 43aff450..aa4dbb15 100644
--- a/bitcoin/src/blockdata/script/tests.rs
+++ b/bitcoin/src/blockdata/script/tests.rs
@@ -623,7 +623,7 @@ fn script_buf_collect() {
}
#[test]
-fn script_p2sh_p2p2k_template() {
+fn script_p2sh_p2pkh_template() {
// random outputs I picked out of the mempool
assert!(ScriptPubKeyBuf::from_hex_no_length_prefix(
"76a91402306a7c23f3e8010de41e9e591348bb83f11daa88ac"
diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs
index 8427a800..f995149c 100644
--- a/bitcoin/src/crypto/key.rs
+++ b/bitcoin/src/crypto/key.rs
@@ -1144,7 +1144,7 @@ impl fmt::Display for FromWifError {
InvalidAddressVersion(ref e) =>
write_err!(f, "decoded base58 data contained an invalid address version byte"; e),
Secp256k1(ref e) => write_err!(f, "private key validation failed"; e),
- InvalidWifCompressionFlag(ref e) => write_err!(f, "invalid WIF compression flag";e),
+ InvalidWifCompressionFlag(ref e) => write_err!(f, "invalid WIF compression flag"; e),
}
}
}
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.