mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -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<Response, _> = serde_json::from_str(&response);
|
||||
let result: Result<Response, _> = 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,
|
||||
|
||||
@@ -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<dyn Stream<Item = Result<Box<RawValue>, RpcError>> + Send + 'static>,
|
||||
> = Box::pin(stream.map(|res| Ok(res)));
|
||||
> = Box::pin(stream.map(Ok));
|
||||
|
||||
let rpc_subscription: RpcSubscription = RpcSubscription {
|
||||
stream: rpc_substription_stream,
|
||||
|
||||
Reference in New Issue
Block a user