Skip to content

Commit 4576c47

Browse files
committed
fix import
1 parent 7b67618 commit 4576c47

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

subxt/src/backend/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ pub mod chain_head;
1010
pub mod legacy;
1111
pub mod utils;
1212

13-
use subxt_core::client::RuntimeVersion;
14-
1513
use crate::error::Error;
1614
use crate::metadata::Metadata;
1715
use crate::Config;
@@ -20,12 +18,14 @@ use codec::{Decode, Encode};
2018
use futures::{Stream, StreamExt};
2119
use std::pin::Pin;
2220
use std::sync::Arc;
21+
use subxt_core::client::RuntimeVersion;
2322

2423
/// Some re-exports from the [`subxt_rpcs`] crate, also accessible in full via [`crate::ext::subxt_rpcs`].
2524
pub mod rpc {
26-
pub use subxt_rpcs::client::{
27-
reconnecting_rpc_client, RawRpcFuture, RawRpcSubscription, RawValue,
28-
};
25+
pub use subxt_rpcs::client::{RawRpcFuture, RawRpcSubscription, RawValue};
26+
crate::macros::cfg_reconnecting_rpc_client! {
27+
pub use subxt_rpcs::client::reconnecting_rpc_client;
28+
}
2929
pub use subxt_rpcs::{RpcClient, RpcClientT};
3030
}
3131

subxt/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
))]
1919
compile_error!("subxt: exactly one of the 'web' and 'native' features should be used.");
2020

21+
// Internal helper macros
22+
#[macro_use]
23+
mod macros;
24+
2125
// The guide is here.
2226
pub mod book;
2327

@@ -80,10 +84,6 @@ pub mod dynamic {
8084
};
8185
}
8286

83-
// Internal helper macros
84-
#[macro_use]
85-
mod macros;
86-
8787
// Expose light client bits
8888
cfg_unstable_light_client! {
8989
pub use subxt_lightclient as lightclient;

subxt/src/macros.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ macro_rules! cfg_unstable_light_client {
1818
};
1919
}
2020

21+
macro_rules! cfg_reconnecting_rpc_client {
22+
($($item:item)*) => {
23+
crate::macros::cfg_feature!("reconnecting-rpc-client", $($item)*);
24+
};
25+
}
26+
2127
macro_rules! cfg_jsonrpsee {
2228
($($item:item)*) => {
2329
crate::macros::cfg_feature!("jsonrpsee", $($item)*);
@@ -50,4 +56,4 @@ pub(crate) use {cfg_feature, cfg_jsonrpsee, cfg_unstable_light_client};
5056

5157
// Only used by light-client.
5258
#[allow(unused)]
53-
pub(crate) use {cfg_jsonrpsee_native, cfg_jsonrpsee_web};
59+
pub(crate) use {cfg_jsonrpsee_native, cfg_jsonrpsee_web, cfg_reconnecting_rpc_client};

0 commit comments

Comments
 (0)