Skip to content

Commit a550947

Browse files
committed
Merge rust-bitcoin#4937: fix: correct function names in deprecation notes
ca94c49 Fix typos in deprecated method names (jrakibi) Pull request description: While reviewing the code to better understand `script::Builder` (issue rust-bitcoin#4917), I noticed we referenced functions in deprecation notes and comments that don't exist This PR: - Fix deprecation note: `from_hex_string_no_length_prefix()` → `from_hex_no_length_prefix()` - Fix comment in script example: `from_hex_string_prefixed` → `from_hex_prefixed` ACKs for top commit: tcharding: ACK ca94c49 Tree-SHA512: c2382339780a944e13f3551e2bb9edc06d94f5be45118733fb12d8e61a440760ab5bd824ef956e5092032eb25859cd6cbbb42b3751e8df9475e275adec90e439
2 parents 632fc27 + ca94c49 commit a550947

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bitcoin/examples/script.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn main() {
5151
let hex_inherent = script_code.to_hex_string_prefixed(); // Defined in `ScriptExt`.
5252
println!("hex created using inherent `to_hex_string_prefixed`: {hex_inherent}");
5353

54-
// The inverse of `to_hex_string_prefixed` is `from_hex_string_prefixed`.
54+
// The inverse of `to_hex_string_prefixed` is `from_hex_prefixed`.
5555
let decoded = WitnessScriptBuf::from_hex_prefixed(&hex_inherent).unwrap(); // Defined in `ScriptBufExt`.
5656
assert_eq!(decoded, script_code);
5757
// We can also parse the output of `to_hex_string_prefixed` using `deserialize_hex`.

bitcoin/src/blockdata/script/owned.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ internal_macros::define_extension_trait! {
105105
}
106106

107107
/// Constructs a new [`ScriptBuf`] from a hex string.
108-
#[deprecated(since = "TBD", note = "use `from_hex_string_no_length_prefix()` instead")]
108+
#[deprecated(since = "TBD", note = "use `from_hex_no_length_prefix()` instead")]
109109
fn from_hex(s: &str) -> Result<Self, hex::HexToBytesError>
110110
where Self: Sized
111111
{

0 commit comments

Comments
 (0)