aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/src/server/channel.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-06-30 20:03:02 +0200
committerhozan23 <hozan23@karyontech.net>2024-06-30 20:03:02 +0200
commit3c55168b72c022b618822c7993b7692f583506db (patch)
tree146c03f6cc19956ec0acfb7ba26a6202cb5a9647 /jsonrpc/src/server/channel.rs
parent2ec4d4a3c3779dc016c8437891f825a54a805808 (diff)
jsonrpc: remove redundant macro codes in the main crate and clean up
internal proc macros
Diffstat (limited to 'jsonrpc/src/server/channel.rs')
-rw-r--r--jsonrpc/src/server/channel.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/jsonrpc/src/server/channel.rs b/jsonrpc/src/server/channel.rs
index 36896b4..7eff66f 100644
--- a/jsonrpc/src/server/channel.rs
+++ b/jsonrpc/src/server/channel.rs
@@ -52,7 +52,7 @@ impl Subscription {
}
/// Checks from the partent if this subscription is still subscribed
- pub async fn still_subscribed(&self) -> bool {
+ async fn still_subscribed(&self) -> bool {
match self.parent.upgrade() {
Some(parent) => parent.subs.lock().await.contains(&self.id),
None => false,
@@ -93,7 +93,8 @@ impl Channel {
subs.remove(i);
}
- pub fn close(&self) {
+ /// Closes the [`Channel`]
+ pub(crate) fn close(&self) {
self.chan.close();
}
}