Refactor code to avoid incorrect clippy::unnecessary_to_owned lint (#3270)

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
This commit is contained in:
teor 2021-12-21 17:58:24 +10:00 committed by GitHub
parent 6814525a7a
commit a8d2e45e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -551,7 +551,8 @@ where
let mut spent_outputs = HashMap::new();
// fixup the transparent spends
for mut input in transaction.inputs().to_vec().into_iter() {
let original_inputs = transaction.inputs().to_vec();
for mut input in original_inputs.into_iter() {
if input.outpoint().is_some() {
// the transparent chain value pool is the sum of unspent UTXOs,
// so we don't need to check it separately, because we only spend unspent UTXOs