Repository: scs/substrate-api-client (language: rust)

Issue:
Update toolchain



Discussion / hints:

Fix patch:
diff --git a/node-api/src/events/event_details.rs b/node-api/src/events/event_details.rs
index 53a3deb50..796e9171f 100644
--- a/node-api/src/events/event_details.rs
+++ b/node-api/src/events/event_details.rs
@@ -130,7 +130,6 @@ impl<Hash: Encode + Decode> EventDetails<Hash> {
 	}
 
 	/// Returns the dispatch error of the failed extrinsic, if it has failed.
-
 	pub fn get_associated_dispatch_error(&self) -> Option<DispatchError> {
 		self.inner.get_associated_dispatch_error(&self.metadata)
 	}
diff --git a/node-api/src/events/mod.rs b/node-api/src/events/mod.rs
index 93bd5c582..3c6cd651b 100644
--- a/node-api/src/events/mod.rs
+++ b/node-api/src/events/mod.rs
@@ -126,8 +126,7 @@ impl<Hash: Copy + Encode + Decode> Events<Hash> {
 	/// 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>> + '_ {
-		self.iter()
-			.filter_map(|ev| ev.and_then(|ev| ev.as_event::<Ev>().map_err(Into::into)).transpose())
+		self.iter().filter_map(|ev| ev.and_then(|ev| ev.as_event::<Ev>()).transpose())
 	}
 
 	/// Iterate through the events using metadata to dynamically decode and skip
diff --git a/node-api/src/metadata/print_metadata.rs b/node-api/src/metadata/print_metadata.rs
index 0e8bedb31..584546138 100644
--- a/node-api/src/metadata/print_metadata.rs
+++ b/node-api/src/metadata/print_metadata.rs
@@ -94,7 +94,7 @@ impl Metadata {
 	}
 }
 
-impl<'a> PalletMetadata<'a> {
+impl PalletMetadata<'_> {
 	pub fn print(&self) {
 		println!("----------------- Pallet: '{}' -----------------\n", self.name());
 		println!("Pallet id: {}", self.index());
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index e60890750..e251cc1f2 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,4 +1,4 @@
 [toolchain]
-channel = "nightly-2024-09-15"
+channel = "nightly-2025-01-20"
 targets = ["wasm32-unknown-unknown", "wasm32-wasip1"]
 profile = "default" # include rustfmt, clippy
diff --git a/src/rpc/jsonrpsee_client/mod.rs b/src/rpc/jsonrpsee_client/mod.rs
index 30b6f1018..d835c5f9f 100644
--- a/src/rpc/jsonrpsee_client/mod.rs
+++ b/src/rpc/jsonrpsee_client/mod.rs
@@ -110,7 +110,10 @@ impl Request for JsonrpseeClient {
 
 #[maybe_async::async_impl(?Send)]
 impl Subscribe for JsonrpseeClient {
-	type Subscription<Notification> = SubscriptionWrapper<Notification> where Notification: DeserializeOwned;
+	type Subscription<Notification>
+		= SubscriptionWrapper<Notification>
+	where
+		Notification: DeserializeOwned;
 
 	async fn subscribe<Notification: DeserializeOwned>(
 		&self,
diff --git a/src/rpc/tungstenite_client/client.rs b/src/rpc/tungstenite_client/client.rs
index 99b7c1d0f..527f2e274 100644
--- a/src/rpc/tungstenite_client/client.rs
+++ b/src/rpc/tungstenite_client/client.rs
@@ -80,7 +80,10 @@ impl Request for TungsteniteRpcClient {
 
 #[maybe_async::maybe_async(?Send)]
 impl Subscribe for TungsteniteRpcClient {
-	type Subscription<Notification> = TungsteniteSubscriptionWrapper<Notification> where Notification: DeserializeOwned;
+	type Subscription<Notification>
+		= TungsteniteSubscriptionWrapper<Notification>
+	where
+		Notification: DeserializeOwned;
 
 	async fn subscribe<Notification: DeserializeOwned>(
 		&self,
diff --git a/src/rpc/ws_client/client.rs b/src/rpc/ws_client/client.rs
index b3830e5c7..fe218eae1 100644
--- a/src/rpc/ws_client/client.rs
+++ b/src/rpc/ws_client/client.rs
@@ -72,7 +72,10 @@ impl Request for WsRpcClient {
 
 #[maybe_async::maybe_async(?Send)]
 impl Subscribe for WsRpcClient {
-	type Subscription<Notification> = WsSubscriptionWrapper<Notification> where Notification: DeserializeOwned;
+	type Subscription<Notification>
+		= WsSubscriptionWrapper<Notification>
+	where
+		Notification: DeserializeOwned;
 
 	async fn subscribe<Notification: DeserializeOwned>(
 		&self,


Test patch: