mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
cargo fmt with stable defaults (#876)
This commit is contained in:
+2
-10
@@ -11,17 +11,9 @@
|
||||
mod offline_client;
|
||||
mod online_client;
|
||||
|
||||
pub use offline_client::{
|
||||
OfflineClient,
|
||||
OfflineClientT,
|
||||
};
|
||||
pub use offline_client::{OfflineClient, OfflineClientT};
|
||||
pub use online_client::{
|
||||
ClientRuntimeUpdater,
|
||||
OnlineClient,
|
||||
OnlineClientT,
|
||||
RuntimeUpdaterStream,
|
||||
Update,
|
||||
UpgradeError,
|
||||
ClientRuntimeUpdater, OnlineClient, OnlineClientT, RuntimeUpdaterStream, Update, UpgradeError,
|
||||
};
|
||||
|
||||
#[cfg(any(
|
||||
|
||||
@@ -3,15 +3,9 @@
|
||||
// see LICENSE for license details.
|
||||
|
||||
use crate::{
|
||||
blocks::BlocksClient,
|
||||
constants::ConstantsClient,
|
||||
events::EventsClient,
|
||||
rpc::types::RuntimeVersion,
|
||||
runtime_api::RuntimeApiClient,
|
||||
storage::StorageClient,
|
||||
tx::TxClient,
|
||||
Config,
|
||||
Metadata,
|
||||
blocks::BlocksClient, constants::ConstantsClient, events::EventsClient,
|
||||
rpc::types::RuntimeVersion, runtime_api::RuntimeApiClient, storage::StorageClient,
|
||||
tx::TxClient, Config, Metadata,
|
||||
};
|
||||
use derivative::Derivative;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -2,33 +2,22 @@
|
||||
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
||||
// see LICENSE for license details.
|
||||
|
||||
use super::{
|
||||
OfflineClient,
|
||||
OfflineClientT,
|
||||
};
|
||||
use super::{OfflineClient, OfflineClientT};
|
||||
use crate::{
|
||||
blocks::BlocksClient,
|
||||
constants::ConstantsClient,
|
||||
error::Error,
|
||||
events::EventsClient,
|
||||
rpc::{
|
||||
types::{
|
||||
RuntimeVersion,
|
||||
Subscription,
|
||||
},
|
||||
Rpc,
|
||||
RpcClientT,
|
||||
types::{RuntimeVersion, Subscription},
|
||||
Rpc, RpcClientT,
|
||||
},
|
||||
runtime_api::RuntimeApiClient,
|
||||
storage::StorageClient,
|
||||
tx::TxClient,
|
||||
Config,
|
||||
Metadata,
|
||||
};
|
||||
use codec::{
|
||||
Compact,
|
||||
Decode,
|
||||
Config, Metadata,
|
||||
};
|
||||
use codec::{Compact, Decode};
|
||||
use derivative::Derivative;
|
||||
use frame_metadata::RuntimeMetadataPrefixed;
|
||||
use futures::future;
|
||||
@@ -114,12 +103,7 @@ impl<T: Config> OnlineClient<T> {
|
||||
)
|
||||
.await;
|
||||
|
||||
OnlineClient::from_rpc_client_with(
|
||||
genesis_hash?,
|
||||
runtime_version?,
|
||||
metadata?,
|
||||
rpc_client,
|
||||
)
|
||||
OnlineClient::from_rpc_client_with(genesis_hash?, runtime_version?, metadata?, rpc_client)
|
||||
}
|
||||
|
||||
/// Construct a new [`OnlineClient`] by providing all of the underlying details needed
|
||||
@@ -341,7 +325,7 @@ impl<T: Config> ClientRuntimeUpdater<T> {
|
||||
/// Tries to apply a new update.
|
||||
pub fn apply_update(&self, update: Update) -> Result<(), UpgradeError> {
|
||||
if !self.is_runtime_version_different(&update.runtime_version) {
|
||||
return Err(UpgradeError::SameVersion)
|
||||
return Err(UpgradeError::SameVersion);
|
||||
}
|
||||
|
||||
self.do_update(update);
|
||||
@@ -442,18 +426,9 @@ impl Update {
|
||||
#[cfg(feature = "jsonrpsee-ws")]
|
||||
mod jsonrpsee_helpers {
|
||||
pub use jsonrpsee::{
|
||||
client_transport::ws::{
|
||||
InvalidUri,
|
||||
Receiver,
|
||||
Sender,
|
||||
Uri,
|
||||
WsTransportClientBuilder,
|
||||
},
|
||||
client_transport::ws::{InvalidUri, Receiver, Sender, Uri, WsTransportClientBuilder},
|
||||
core::{
|
||||
client::{
|
||||
Client,
|
||||
ClientBuilder,
|
||||
},
|
||||
client::{Client, ClientBuilder},
|
||||
Error,
|
||||
},
|
||||
};
|
||||
@@ -483,10 +458,7 @@ mod jsonrpsee_helpers {
|
||||
pub use jsonrpsee::{
|
||||
client_transport::web,
|
||||
core::{
|
||||
client::{
|
||||
Client,
|
||||
ClientBuilder,
|
||||
},
|
||||
client::{Client, ClientBuilder},
|
||||
Error,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user