aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml3
-rw-r--r--jsonrpc/impl/src/lib.rs12
2 files changed, 7 insertions, 8 deletions
diff --git a/Cargo.toml b/Cargo.toml
index ddf7d4e..1cbc80e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
resolver = "2"
# Please ensure that each crate comes before any other crate that depends on it
-members = ["core", "net", "p2p", "jsonrpc"]
+members = ["core", "net", "net/async_rustls", "jsonrpc", "jsonrpc/impl", "p2p"]
[workspace.package]
description = "A library for building p2p, decentralized, and collaborative software"
@@ -24,7 +24,6 @@ karyon_jsonrpc_macro = { path = "jsonrpc/impl", version = "0.1.6", default-featu
karyon_p2p = { path = "p2p", version = "0.1.6", default-features = false }
-
log = "0.4"
thiserror = "1.0"
chrono = "0.4"
diff --git a/jsonrpc/impl/src/lib.rs b/jsonrpc/impl/src/lib.rs
index 8814e61..d7ea466 100644
--- a/jsonrpc/impl/src/lib.rs
+++ b/jsonrpc/impl/src/lib.rs
@@ -54,9 +54,9 @@ pub fn rpc_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
let item: TokenStream2 = item.into();
quote! {
impl karyon_jsonrpc::RPCService for #self_ty {
- fn get_method<'a>(
- &'a self,
- name: &'a str
+ fn get_method(
+ &self,
+ name: &str
) -> Option<karyon_jsonrpc::RPCMethod> {
match name {
#(#impl_methods)*
@@ -115,9 +115,9 @@ pub fn rpc_pubsub_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
let item: TokenStream2 = item.into();
quote! {
impl karyon_jsonrpc::PubSubRPCService for #self_ty {
- fn get_pubsub_method<'a>(
- &'a self,
- name: &'a str
+ fn get_pubsub_method(
+ &self,
+ name: &str
) -> Option<karyon_jsonrpc::PubSubRPCMethod> {
match name {
#(#impl_methods)*