Skip to content

Commit

Permalink
feat: return ref iter over related contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
iduartgomez committed Dec 30, 2024
1 parent 157966f commit e582de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/contract_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ impl RelatedContracts<'_> {
}

impl RelatedContracts<'static> {
pub fn states(self) -> impl Iterator<Item = (ContractInstanceId, Option<State<'static>>)> {
self.map.into_iter()
pub fn states(&self) -> impl Iterator<Item = (&ContractInstanceId, &Option<State<'static>>)> {
self.map.iter()
}
}

Expand Down

0 comments on commit e582de3

Please sign in to comment.