From 8b5d3542bb42d0d15331b5b28141c6d9ba389a29 Mon Sep 17 00:00:00 2001 From: sadministrator Date: Thu, 16 May 2024 15:12:27 -0600 Subject: [PATCH] implement iter() for CoinMapping --- src/state/coins.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/state/coins.rs b/src/state/coins.rs index fa705581..16b44e87 100644 --- a/src/state/coins.rs +++ b/src/state/coins.rs @@ -1,3 +1,5 @@ +use std::borrow::Cow; + use derivative::Derivative; use novasmt::ContentAddrStore; use stdcode::StdcodeSerializeExt; @@ -90,4 +92,8 @@ impl CoinMapping { self.inner.insert(count_key.0, &count.stdcode()) } } + + pub fn iter(&self) -> impl Iterator)> + '_{ + self.inner.iter() + } }