Skip to content

Commit aabdaa3

Browse files
committed
Pass value instead of reference
Some functions that take a value were passed a reference. Change them all to pass the value.
1 parent 71824cd commit aabdaa3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

integration_test/tests/raw_transactions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ fn arbitrary_p2pkh_script() -> ScriptBuf {
221221
script::Builder::new()
222222
.push_opcode(OP_DUP)
223223
.push_opcode(OP_HASH160)
224-
.push_slice(&pubkey_hash)
224+
.push_slice(pubkey_hash)
225225
.push_opcode(OP_EQUALVERIFY)
226226
.push_opcode(OP_CHECKSIG)
227227
.into_script()
@@ -238,9 +238,9 @@ fn arbitrary_multisig_script() -> ScriptBuf {
238238
script::Builder::new()
239239
.push_opcode(OP_PUSHNUM_1)
240240
.push_opcode(OP_PUSHBYTES_33)
241-
.push_slice(&pk1)
241+
.push_slice(pk1)
242242
.push_opcode(OP_PUSHBYTES_33)
243-
.push_slice(&pk2)
243+
.push_slice(pk2)
244244
.push_opcode(OP_PUSHNUM_2)
245245
.push_opcode(OP_CHECKMULTISIG)
246246
.into_script()
@@ -581,7 +581,7 @@ fn create_fund_sign_send(node: &Node) {
581581

582582
// Creates a transaction using client to do RPC call `create_raw_transaction`.
583583
fn create_a_raw_transaction(node: &Node) -> Transaction {
584-
let (_addr, _tx, txid, tx_out, vout) = create_utxo(&node);
584+
let (_addr, _tx, txid, tx_out, vout) = create_utxo(node);
585585

586586
// Assumes tx_out has a million sats in it.
587587
let spend_amount = Amount::from_sat(100_000);

integration_test/tests/util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn util__derive_addresses__modelled() {
3838
// Use a valid, deterministic public key from the pubkey_sort test vectors and the checksum for it.
3939
let descriptor = "pkh(02ff12471208c14bd580709cb2358d98975247d8765f92bc25eab3b2763ed605f8)#sf4k0g3u";
4040

41-
let json: DeriveAddresses = node.client.derive_addresses(&descriptor).expect("deriveaddresses");
41+
let json: DeriveAddresses = node.client.derive_addresses(descriptor).expect("deriveaddresses");
4242
let res: Result<mtype::DeriveAddresses, _> = json.into_model();
4343
let _ = res.expect("DeriveAddresses into model");
4444
}
@@ -75,7 +75,7 @@ fn util__sign_message_with_priv_key__modelled() {
7575
// Derive the address from the private key
7676
let secp = bitcoin::secp256k1::Secp256k1::new();
7777
let pubkey = privkey.public_key(&secp);
78-
let addr = bitcoin::Address::p2pkh(&pubkey, privkey.network);
78+
let addr = bitcoin::Address::p2pkh(pubkey, privkey.network);
7979

8080
// Sign the message with the private key
8181
let json: SignMessageWithPrivKey = node

integration_test/tests/wallet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn wallet__import_address() {
305305
// Derive the address from the private key
306306
let secp = bitcoin::secp256k1::Secp256k1::new();
307307
let pubkey = privkey.public_key(&secp);
308-
let addr = bitcoin::Address::p2pkh(&pubkey, privkey.network);
308+
let addr = bitcoin::Address::p2pkh(pubkey, privkey.network);
309309

310310
let _: () = node.client.import_address(&addr).expect("importaddress");
311311
}

0 commit comments

Comments
 (0)