Add Send + Sync bounds to ExtrinsicEvents::iter()

This commit is contained in:
Andrew Jones
2022-11-15 10:30:16 +00:00
parent 4838ac0297
commit 996b3edd14
+1 -1
View File
@@ -223,7 +223,7 @@ impl<T: Config> ExtrinsicEvents<T> {
///
/// This works in the same way that [`events::Events::iter()`] does, with the
/// exception that it filters out events not related to the submitted extrinsic.
pub fn iter(&self) -> impl Iterator<Item = Result<events::EventDetails, Error>> + '_ {
pub fn iter(&self) -> impl Iterator<Item = Result<events::EventDetails, Error>> + Send + Sync + 'static {
self.events.iter().filter(|ev| {
ev.as_ref()
.map(|ev| ev.phase() == events::Phase::ApplyExtrinsic(self.idx))