Skip to content

Commit f337f24

Browse files
committed
Replace str::FromStr with MiniscriptKey::from_str
1 parent 4f50f44 commit f337f24

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/descriptor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ where
405405
Ok(Descriptor::ShWsh(sub))
406406
}
407407
("wpkh", 1) => expression::terminal(&newtop.args[0], |pk| {
408-
str::FromStr::from_str(pk).map(Descriptor::ShWpkh)
408+
MiniscriptKey::from_str(pk, true).map(Descriptor::ShWpkh)
409409
}),
410410
_ => {
411411
let sub = Miniscript::from_tree(&top.args[0])?;

src/miniscript/astelem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ where
365365
}
366366
let mut unwrapped = match (frag_name, top.args.len()) {
367367
("pk_k", 1) => expression::terminal(&top.args[0], |x| {
368-
str::FromStr::from_str(x).map(Terminal::PkK)
368+
MiniscriptKey::from_str(x, false).map(Terminal::PkK)
369369
}),
370370
("pk_h", 1) => {
371371
expression::terminal(&top.args[0], |x| Pk::Hash::from_str(x).map(Terminal::PkH))

src/policy/concrete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ where
382382
}
383383
match (frag_name, top.args.len() as u32) {
384384
("pk", 1) => expression::terminal(&top.args[0], |pk| {
385-
str::FromStr::from_str(pk).map(Policy::Key)
385+
MiniscriptKey::from_str(pk, false).map(Policy::Key)
386386
}),
387387
("after", 1) => expression::terminal(&top.args[0], |x| {
388388
expression::parse_num(x).map(Policy::After)

0 commit comments

Comments
 (0)