refactor: Remove ForEachTxout trait

This commit is contained in:
Vladimir Fomene
2023-08-21 11:45:42 +03:00
committed by 志宇
parent 6bcbb93233
commit 7c12dc9942
4 changed files with 20 additions and 80 deletions

View File

@@ -52,7 +52,7 @@
use crate::{
collections::*, keychain::Balance, local_chain::LocalChain, Anchor, Append, BlockId,
ChainOracle, ChainPosition, ForEachTxOut, FullTxOut,
ChainOracle, ChainPosition, FullTxOut,
};
use alloc::vec::Vec;
use bitcoin::{OutPoint, Script, Transaction, TxOut, Txid};
@@ -1137,18 +1137,6 @@ impl<A> AsRef<TxGraph<A>> for TxGraph<A> {
}
}
impl<A> ForEachTxOut for ChangeSet<A> {
fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut))) {
self.txouts().for_each(f)
}
}
impl<A> ForEachTxOut for TxGraph<A> {
fn for_each_txout(&self, f: impl FnMut((OutPoint, &TxOut))) {
self.all_txouts().for_each(f)
}
}
/// An iterator that traverses transaction descendants.
///
/// This `struct` is created by the [`walk_descendants`] method of [`TxGraph`].