Skip to content

Commit c20be39

Browse files
committed
Remove explicit reference
Clippy emits: warning: this expression creates a reference which is immediately dereferenced by the compiler As suggested, remove explicit reference.
1 parent 7ed6680 commit c20be39

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bitcoind-tests/tests/test_cpp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
119119
outputs: vec![],
120120
};
121121
// figure out the outpoint from the txid
122-
let (outpoint, witness_utxo) = get_vout(&cl, txid, btc(1.0));
122+
let (outpoint, witness_utxo) = get_vout(cl, txid, btc(1.0));
123123
let txin = TxIn {
124124
previous_output: outpoint,
125125
// set the sequence to a non-final number for the locktime transactions to be
@@ -146,7 +146,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
146146
..Default::default()
147147
};
148148
psbt.inputs.push(input);
149-
psbt.update_input_with_descriptor(0, &desc).unwrap();
149+
psbt.update_input_with_descriptor(0, desc).unwrap();
150150
psbt.outputs.push(psbt::Output::default());
151151
psbts.push(psbt);
152152
}

bitcoind-tests/tests/test_desc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn test_desc_satisfy(
8181
.unwrap();
8282
assert_eq!(blocks.len(), 1);
8383

84-
let definite_desc = test_util::parse_test_desc(&descriptor, &testdata.pubdata)
84+
let definite_desc = test_util::parse_test_desc(descriptor, &testdata.pubdata)
8585
.map_err(|_| DescError::DescParseError)?
8686
.at_derivation_index(0)
8787
.unwrap();
@@ -118,7 +118,7 @@ pub fn test_desc_satisfy(
118118
outputs: vec![],
119119
};
120120
// figure out the outpoint from the txid
121-
let (outpoint, witness_utxo) = get_vout(&cl, txid, btc(1.0), derived_desc.script_pubkey());
121+
let (outpoint, witness_utxo) = get_vout(cl, txid, btc(1.0), derived_desc.script_pubkey());
122122
let txin = TxIn {
123123
previous_output: outpoint,
124124
// set the sequence to a non-final number for the locktime transactions to be
@@ -213,7 +213,7 @@ pub fn test_desc_satisfy(
213213
// Non-tr descriptors
214214
// Ecdsa sigs
215215
let sks_reqd = match derived_desc {
216-
Descriptor::Bare(bare) => find_sks_ms(&bare.as_inner(), testdata),
216+
Descriptor::Bare(bare) => find_sks_ms(bare.as_inner(), testdata),
217217
Descriptor::Pkh(pk) => find_sk_single_key(*pk.as_inner(), testdata),
218218
Descriptor::Wpkh(pk) => find_sk_single_key(*pk.as_inner(), testdata),
219219
Descriptor::Sh(sh) => match sh.as_inner() {
@@ -222,7 +222,7 @@ pub fn test_desc_satisfy(
222222
let ms = Miniscript::from_ast(smv.sorted_node()).unwrap();
223223
find_sks_ms(&ms, testdata)
224224
}
225-
miniscript::descriptor::WshInner::Ms(ref ms) => find_sks_ms(&ms, testdata),
225+
miniscript::descriptor::WshInner::Ms(ref ms) => find_sks_ms(ms, testdata),
226226
},
227227
miniscript::descriptor::ShInner::Wpkh(pk) => {
228228
find_sk_single_key(*pk.as_inner(), testdata)
@@ -231,14 +231,14 @@ pub fn test_desc_satisfy(
231231
let ms = Miniscript::from_ast(smv.sorted_node()).unwrap();
232232
find_sks_ms(&ms, testdata)
233233
}
234-
miniscript::descriptor::ShInner::Ms(ms) => find_sks_ms(&ms, testdata),
234+
miniscript::descriptor::ShInner::Ms(ms) => find_sks_ms(ms, testdata),
235235
},
236236
Descriptor::Wsh(wsh) => match wsh.as_inner() {
237237
miniscript::descriptor::WshInner::SortedMulti(ref smv) => {
238238
let ms = Miniscript::from_ast(smv.sorted_node()).unwrap();
239239
find_sks_ms(&ms, testdata)
240240
}
241-
miniscript::descriptor::WshInner::Ms(ref ms) => find_sks_ms(&ms, testdata),
241+
miniscript::descriptor::WshInner::Ms(ref ms) => find_sks_ms(ms, testdata),
242242
},
243243
Descriptor::Tr(_tr) => unreachable!("Tr checked earlier"),
244244
};

0 commit comments

Comments
 (0)