Skip to content

Commit 7634642

Browse files
committed
Use struct update syntax
clippy emits: error: field assignment outside of initializer for an instance created with Default::default() Use struct update syntax instead.
1 parent 2bc083e commit 7634642

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/psbt_sign_finalize.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ fn main() {
8181

8282
let (outpoint, witness_utxo) = get_vout(&depo_tx, &bridge_descriptor.script_pubkey());
8383

84-
let mut txin = TxIn::default();
85-
txin.previous_output = outpoint;
86-
87-
txin.sequence = Sequence::from_height(26); //Sequence::MAX; //
84+
let txin = TxIn {
85+
previous_output: outpoint,
86+
sequence: Sequence::from_height(26),
87+
..Default::default()
88+
};
8889
psbt.unsigned_tx.input.push(txin);
8990

9091
psbt.unsigned_tx.output.push(TxOut {

0 commit comments

Comments
 (0)