Use as_ref() instead of costly clone()

This commit is contained in:
DanGould 2023-01-09 23:17:04 -05:00
parent debcce6a03
commit 81ca10701a
No known key found for this signature in database
GPG Key ID: B07290B28996AFE0
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ fn finalize_psbt(mut psbt: Psbt) -> Psbt {
// Input 1: SegWit UTXO
let script_sig = script::Builder::new()
.push_slice(psbt.inputs[1].redeem_script.clone().unwrap().as_bytes())
.push_slice(psbt.inputs[1].redeem_script.as_ref().unwrap().as_bytes())
.into_script();
psbt.inputs[1].final_script_sig = Some(script_sig);