mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 16:25:41 +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.
|
// 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 {
|
if let Ok(response) = result {
|
||||||
return Ok(RpcResponse::Method {
|
return Ok(RpcResponse::Method {
|
||||||
id: response.id,
|
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 {
|
Ok(RpcResponse::Subscription {
|
||||||
id: notification.params.subscription,
|
id: notification.params.subscription,
|
||||||
method: notification.method,
|
method: notification.method,
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ impl RpcClientT for LightClient {
|
|||||||
id, method, params
|
id, method, params
|
||||||
);
|
);
|
||||||
tracing::trace!(target: LOG_TARGET, "Submit request {:?}", request);
|
tracing::trace!(target: LOG_TARGET, "Submit request {:?}", request);
|
||||||
let chain_id = data.chain_id.clone();
|
let chain_id = data.chain_id;
|
||||||
|
|
||||||
data.client
|
data.client
|
||||||
.json_rpc_request(request, chain_id)
|
.json_rpc_request(request, chain_id)
|
||||||
@@ -338,7 +338,7 @@ impl RpcClientT for LightClient {
|
|||||||
id, sub, params
|
id, sub, params
|
||||||
);
|
);
|
||||||
|
|
||||||
let chain_id = data.chain_id.clone();
|
let chain_id = data.chain_id;
|
||||||
data.client
|
data.client
|
||||||
.json_rpc_request(request, chain_id)
|
.json_rpc_request(request, chain_id)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
@@ -368,7 +368,7 @@ impl RpcClientT for LightClient {
|
|||||||
|
|
||||||
let rpc_substription_stream: Pin<
|
let rpc_substription_stream: Pin<
|
||||||
Box<dyn Stream<Item = Result<Box<RawValue>, RpcError>> + Send + 'static>,
|
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 {
|
let rpc_subscription: RpcSubscription = RpcSubscription {
|
||||||
stream: rpc_substription_stream,
|
stream: rpc_substription_stream,
|
||||||
|
|||||||
Reference in New Issue
Block a user