From 705690ee8fddba8517d907183b7ddfeafb633609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=97=E5=AE=87?= Date: Sat, 13 Jan 2024 19:57:30 +0800 Subject: [PATCH] feat(chain): make output of `SpkTxOutIndex::unused_spks` cloneable This allows us to pass this to chain sources without calling `Iterator::collect` first. --- crates/chain/src/spk_txout_index.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/chain/src/spk_txout_index.rs b/crates/chain/src/spk_txout_index.rs index 8df1b119..90ee7dca 100644 --- a/crates/chain/src/spk_txout_index.rs +++ b/crates/chain/src/spk_txout_index.rs @@ -215,7 +215,7 @@ impl SpkTxOutIndex { /// let unused_change_spks = /// txout_index.unused_spks((change_index, u32::MIN)..(change_index, u32::MAX)); /// ``` - pub fn unused_spks(&self, range: R) -> impl DoubleEndedIterator + pub fn unused_spks(&self, range: R) -> impl DoubleEndedIterator + Clone where R: RangeBounds, {