From 58a43b309e3aa94a2dcd6b2aa35a577017217acc Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Mon, 8 Jul 2024 11:15:12 +0100 Subject: [PATCH] Add missing ref keyword This change ensures that the value is borrowed rather than moved. --- bitcoin/src/p2p/message_blockdata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitcoin/src/p2p/message_blockdata.rs b/bitcoin/src/p2p/message_blockdata.rs index 44ae0fa68..9c9d3b001 100644 --- a/bitcoin/src/p2p/message_blockdata.rs +++ b/bitcoin/src/p2p/message_blockdata.rs @@ -70,7 +70,7 @@ impl Encodable for Inventory { Inventory::Transaction(ref t) => encode_inv!(1, t), Inventory::Block(ref b) => encode_inv!(2, b), Inventory::CompactBlock(ref b) => encode_inv!(4, b), - Inventory::WTx(w) => encode_inv!(5, w), + Inventory::WTx(ref w) => encode_inv!(5, w), Inventory::WitnessTransaction(ref t) => encode_inv!(0x40000001, t), Inventory::WitnessBlock(ref b) => encode_inv!(0x40000002, b), Inventory::Unknown { inv_type: t, hash: ref d } => encode_inv!(t, d),