feat(chain): make output of SpkTxOutIndex::unused_spks cloneable

This allows us to pass this to chain sources without calling
`Iterator::collect` first.
This commit is contained in:
志宇 2024-01-13 19:57:30 +08:00
parent cd602430ee
commit 705690ee8f
No known key found for this signature in database
GPG Key ID: F6345C9837C2BDE8

View File

@ -215,7 +215,7 @@ impl<I: Clone + Ord> SpkTxOutIndex<I> {
/// let unused_change_spks =
/// txout_index.unused_spks((change_index, u32::MIN)..(change_index, u32::MAX));
/// ```
pub fn unused_spks<R>(&self, range: R) -> impl DoubleEndedIterator<Item = (&I, &Script)>
pub fn unused_spks<R>(&self, range: R) -> impl DoubleEndedIterator<Item = (&I, &Script)> + Clone
where
R: RangeBounds<I>,
{