Update to 2024 edition (#2001)

* Update to 2024 edition

* Update to 2024 edition; fmt, use<> and remove refs

* async functions
This commit is contained in:
James Wilson
2025-05-09 16:12:18 +01:00
committed by GitHub
parent 98c1d153b6
commit 23c62f3d5d
120 changed files with 399 additions and 322 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
use crate::{
config::{Config, HashFor},
Error, Metadata,
config::{Config, HashFor},
};
use derive_where::derive_where;
use scale_decode::DecodeAsType;
@@ -58,7 +58,7 @@ impl<T: Config> Events<T> {
/// Iterate through the events using metadata to dynamically decode and skip
/// them, and return only those which should decode to the provided `Ev` type.
/// If an error occurs, all subsequent iterations return `None`.
pub fn find<Ev: StaticEvent>(&self) -> impl Iterator<Item = Result<Ev, Error>> + '_ {
pub fn find<Ev: StaticEvent>(&self) -> impl Iterator<Item = Result<Ev, Error>> {
self.inner.find::<Ev>().map(|item| item.map_err(Into::into))
}
+2 -2
View File
@@ -9,11 +9,11 @@
mod events_client;
mod events_type;
use crate::client::OnlineClientT;
use crate::Error;
use crate::client::OnlineClientT;
use subxt_core::{
config::{Config, HashFor},
Metadata,
config::{Config, HashFor},
};
pub use events_client::EventsClient;