@@ -24,9 +24,9 @@ use ToPublicKey;
24
24
/// NOTE: Miniscript pushes should only be either boolean, 1 or 0, signatures, and hash preimages.
25
25
/// As per the current implementation, PUSH_NUM2 results in an error
26
26
fn instr_to_stackelem < ' txin > (
27
- ins : & Result < Instruction < ' txin > , bitcoin:: blockdata:: script:: Error > ,
27
+ ins : Result < Instruction < ' txin > , bitcoin:: blockdata:: script:: Error > ,
28
28
) -> Result < StackElement < ' txin > , Error > {
29
- match * ins {
29
+ match ins {
30
30
//Also covers the dissatisfied case as PushBytes0
31
31
Ok ( Instruction :: PushBytes ( v) ) => Ok ( StackElement :: from ( v) ) ,
32
32
Ok ( Instruction :: Op ( opcodes:: all:: OP_PUSHNUM_1 ) ) => Ok ( StackElement :: Satisfied ) ,
@@ -42,7 +42,7 @@ fn parse_scriptsig_top<'txin>(
42
42
) -> Result < ( Vec < u8 > , Stack < ' txin > ) , Error > {
43
43
let stack: Result < Vec < StackElement > , Error > = script_sig
44
44
. instructions_minimal ( )
45
- . map ( |instr| instr_to_stackelem ( & instr ) )
45
+ . map ( instr_to_stackelem)
46
46
. collect ( ) ;
47
47
let mut stack = stack?;
48
48
if let Some ( StackElement :: Push ( pk_bytes) ) = stack. pop ( ) {
@@ -64,7 +64,7 @@ fn verify_p2pk<'txin>(
64
64
if let Ok ( pk) = bitcoin:: PublicKey :: from_slice ( & pk_bytes[ 1 ..script_pubkey_len - 1 ] ) {
65
65
let stack: Result < Vec < StackElement > , Error > = script_sig
66
66
. instructions_minimal ( )
67
- . map ( |instr| instr_to_stackelem ( & instr ) )
67
+ . map ( instr_to_stackelem)
68
68
. collect ( ) ;
69
69
if !witness. is_empty ( ) {
70
70
Err ( Error :: NonEmptyWitness )
@@ -228,7 +228,7 @@ pub fn from_txin_with_witness_stack<'txin>(
228
228
//bare
229
229
let stack: Result < Vec < StackElement > , Error > = script_sig
230
230
. instructions_minimal ( )
231
- . map ( |instr| instr_to_stackelem ( & instr ) )
231
+ . map ( instr_to_stackelem)
232
232
. collect ( ) ;
233
233
if !witness. is_empty ( ) {
234
234
return Err ( Error :: NonEmptyWitness ) ;
0 commit comments