diff --git a/subxt/src/rpc/lightclient/background.rs b/subxt/src/rpc/lightclient/background.rs index 725e6c58b6..47137dc51a 100644 --- a/subxt/src/rpc/lightclient/background.rs +++ b/subxt/src/rpc/lightclient/background.rs @@ -280,7 +280,7 @@ impl std::str::FromStr for RpcResponse { } // Check if the response can be mapped as an RPC method response. - let result: Result = serde_json::from_str(&response); + let result: Result = serde_json::from_str(response); if let Ok(response) = result { return Ok(RpcResponse::Method { id: response.id, @@ -288,7 +288,7 @@ impl std::str::FromStr for RpcResponse { }); } - let notification: ResponseNotification = serde_json::from_str(&response)?; + let notification: ResponseNotification = serde_json::from_str(response)?; Ok(RpcResponse::Subscription { id: notification.params.subscription, method: notification.method, diff --git a/subxt/src/rpc/lightclient/client.rs b/subxt/src/rpc/lightclient/client.rs index 9f128bed33..b67bdd354b 100644 --- a/subxt/src/rpc/lightclient/client.rs +++ b/subxt/src/rpc/lightclient/client.rs @@ -282,7 +282,7 @@ impl RpcClientT for LightClient { id, method, params ); tracing::trace!(target: LOG_TARGET, "Submit request {:?}", request); - let chain_id = data.chain_id.clone(); + let chain_id = data.chain_id; data.client .json_rpc_request(request, chain_id) @@ -338,7 +338,7 @@ impl RpcClientT for LightClient { id, sub, params ); - let chain_id = data.chain_id.clone(); + let chain_id = data.chain_id; data.client .json_rpc_request(request, chain_id) .map_err(|err| { @@ -368,7 +368,7 @@ impl RpcClientT for LightClient { let rpc_substription_stream: Pin< Box, RpcError>> + Send + 'static>, - > = Box::pin(stream.map(|res| Ok(res))); + > = Box::pin(stream.map(Ok)); let rpc_subscription: RpcSubscription = RpcSubscription { stream: rpc_substription_stream,