Skip to content

Commit 2bd4163

Browse files
committed
comments feedback
1 parent 972ed0c commit 2bd4163

File tree

3 files changed

+13
-24
lines changed

3 files changed

+13
-24
lines changed

rpc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ pub use crate::server::RpcServer;
1818
pub use crate::service_builder::ServiceBuilder;
1919

2020
#[doc(hidden)]
21-
pub type IoHandler = MetaIoHandler<std::option::Option<Session>>;
21+
pub type IoHandler = MetaIoHandler<Option<Session>>;

rpc/src/module/mod.rs

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -134,25 +134,14 @@ pub(crate) use self::stats::StatsRpcImpl;
134134
pub(crate) use self::subscription::SubscriptionRpcImpl;
135135
pub(crate) use self::test::IntegrationTestRpcImpl;
136136

137-
pub use self::alert::add_alert_rpc_methods;
138-
pub use self::alert::AlertRpc;
139-
pub use self::chain::add_chain_rpc_methods;
140-
pub use self::chain::ChainRpc;
141-
pub use self::debug::add_debug_rpc_methods;
142-
pub use self::debug::DebugRpc;
143-
pub use self::experiment::add_experiment_rpc_methods;
144-
pub use self::experiment::ExperimentRpc;
145-
pub use self::indexer::add_indexer_rpc_methods;
146-
pub use self::indexer::IndexerRpc;
147-
pub use self::miner::add_miner_rpc_methods;
148-
pub use self::miner::MinerRpc;
149-
pub use self::net::add_net_rpc_methods;
150-
pub use self::net::NetRpc;
151-
pub use self::pool::add_pool_rpc_methods;
152-
pub use self::pool::PoolRpc;
153-
pub use self::stats::add_stats_rpc_methods;
154-
pub use self::stats::StatsRpc;
155-
pub use self::subscription::add_subscription_rpc_methods;
156-
pub use self::subscription::SubscriptionRpc;
157-
pub use self::test::add_integration_test_rpc_methods;
158-
pub use self::test::IntegrationTestRpc;
137+
pub use self::alert::{add_alert_rpc_methods, AlertRpc};
138+
pub use self::chain::{add_chain_rpc_methods, ChainRpc};
139+
pub use self::debug::{add_debug_rpc_methods, DebugRpc};
140+
pub use self::experiment::{add_experiment_rpc_methods, ExperimentRpc};
141+
pub use self::indexer::{add_indexer_rpc_methods, IndexerRpc};
142+
pub use self::miner::{add_miner_rpc_methods, MinerRpc};
143+
pub use self::net::{add_net_rpc_methods, NetRpc};
144+
pub use self::pool::{add_pool_rpc_methods, PoolRpc};
145+
pub use self::stats::{add_stats_rpc_methods, StatsRpc};
146+
pub use self::subscription::{add_subscription_rpc_methods, SubscriptionRpc};
147+
pub use self::test::{add_integration_test_rpc_methods, IntegrationTestRpc};

rpc/src/service_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<'a> ServiceBuilder<'a> {
246246
rpc_methods.into_iter().for_each(|(name, _method)| {
247247
let error = Err(RPCError::rpc_module_is_disabled(module));
248248
self.io_handler.add_sync_method(
249-
name.split("deprecated.")
249+
name.split(DEPRECATED_RPC_PREFIX)
250250
.collect::<Vec<&str>>()
251251
.last()
252252
.unwrap(),

0 commit comments

Comments
 (0)