Skip to content

Commit

Permalink
Use struct update syntax
Browse files Browse the repository at this point in the history
clippy emits:

 error: field assignment outside of initializer for an instance created
 with Default::default()

Use struct update syntax instead.
  • Loading branch information
tcharding committed Mar 28, 2024
1 parent 2bc083e commit 7634642
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/psbt_sign_finalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ fn main() {

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

let mut txin = TxIn::default();
txin.previous_output = outpoint;

txin.sequence = Sequence::from_height(26); //Sequence::MAX; //
let txin = TxIn {
previous_output: outpoint,
sequence: Sequence::from_height(26),
..Default::default()
};
psbt.unsigned_tx.input.push(txin);

psbt.unsigned_tx.output.push(TxOut {
Expand Down

0 comments on commit 7634642

Please sign in to comment.