What changed, and why it matters
This commit fixes two typos in documentation and deprecation messages: one in a code example comment and one in a deprecation note telling users which new method to use. There is no code behavior change and no security impact.
No security action needed; this is a documentation/deprecation-message typo fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff corrects method name references in a Rust example comment and a #[deprecated] attribute note. In bitcoin/examples/script.rs, the comment now points to from_hex_prefixed instead of the non-existent from_hex_string_prefixed. In bitcoin/src/blockdata/script/owned.rs, the deprecation note now points to from_hex_no_length_prefix instead of from_hex_string_no_length_prefix. No executable code, signatures, parsing logic, or cryptographic operations were modified.
Changed components
bitcoin/examples/script.rsbitcoin/src/blockdata/script/owned.rsInspect captured patch +2 / −2
diff --git a/bitcoin/examples/script.rs b/bitcoin/examples/script.rs
index 2a4b0492..596be007 100644
--- a/bitcoin/examples/script.rs
+++ b/bitcoin/examples/script.rs
@@ -51,7 +51,7 @@ fn main() {
let hex_inherent = script_code.to_hex_string_prefixed(); // Defined in `ScriptExt`.
println!("hex created using inherent `to_hex_string_prefixed`: {hex_inherent}");
- // The inverse of `to_hex_string_prefixed` is `from_hex_string_prefixed`.
+ // The inverse of `to_hex_string_prefixed` is `from_hex_prefixed`.
let decoded = WitnessScriptBuf::from_hex_prefixed(&hex_inherent).unwrap(); // Defined in `ScriptBufExt`.
assert_eq!(decoded, script_code);
// We can also parse the output of `to_hex_string_prefixed` using `deserialize_hex`.
diff --git a/bitcoin/src/blockdata/script/owned.rs b/bitcoin/src/blockdata/script/owned.rs
index b359182b..46c84dbf 100644
--- a/bitcoin/src/blockdata/script/owned.rs
+++ b/bitcoin/src/blockdata/script/owned.rs
@@ -105,7 +105,7 @@ internal_macros::define_extension_trait! {
}
/// Constructs a new [`ScriptBuf`] from a hex string.
- #[deprecated(since = "TBD", note = "use `from_hex_string_no_length_prefix()` instead")]
+ #[deprecated(since = "TBD", note = "use `from_hex_no_length_prefix()` instead")]
fn from_hex(s: &str) -> Result<Self, hex::HexToBytesError>
where Self: Sized
{
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.