From cad7e838423a01b3bd5a3093f1b03ff15a4e2e2c Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Mon, 17 Jun 2024 07:29:34 -0500 Subject: [PATCH] SDK AccountKeys: make iter Clone-able --- sdk/program/src/message/account_keys.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/program/src/message/account_keys.rs b/sdk/program/src/message/account_keys.rs index 6f80c3c68e6186..e7bb569d03643b 100644 --- a/sdk/program/src/message/account_keys.rs +++ b/sdk/program/src/message/account_keys.rs @@ -33,7 +33,7 @@ impl<'a> AccountKeys<'a> { /// Returns an iterator of account key segments. The ordering of segments /// affects how account indexes from compiled instructions are resolved and /// so should not be changed. - fn key_segment_iter(&self) -> impl Iterator { + fn key_segment_iter(&self) -> impl Iterator + Clone { if let Some(dynamic_keys) = self.dynamic_keys { [ self.static_keys, @@ -77,7 +77,7 @@ impl<'a> AccountKeys<'a> { } /// Iterator for the addresses of the loaded accounts for a message - pub fn iter(&self) -> impl Iterator { + pub fn iter(&self) -> impl Iterator + Clone { self.key_segment_iter().flatten() }