From: 志宇 Date: Sat, 13 Jan 2024 11:57:30 +0000 (+0800) Subject: feat(chain): make output of `SpkTxOutIndex::unused_spks` cloneable X-Git-Tag: v1.0.0-alpha.4~2^2~6 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.DisplayArray.html?a=commitdiff_plain;h=705690ee8fddba8517d907183b7ddfeafb633609;p=bdk feat(chain): make output of `SpkTxOutIndex::unused_spks` cloneable This allows us to pass this to chain sources without calling `Iterator::collect` first. --- 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, {