diff options
author | hozan23 <hozan23@karyontech.net> | 2024-10-12 22:31:49 +0200 |
---|---|---|
committer | hozan23 <hozan23@karyontech.net> | 2024-10-12 22:31:49 +0200 |
commit | f9036b9e890a955b1a0e2fdde3bf9712360a8ca0 (patch) | |
tree | a0957637e890104b8bfb8ddb83f91068c732c999 | |
parent | c2c4cb08c370bc27a06fa89403354859f791c23f (diff) |
-rw-r--r-- | Cargo.toml | 3 | ||||
-rw-r--r-- | jsonrpc/impl/src/lib.rs | 12 |
2 files changed, 7 insertions, 8 deletions
@@ -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)* |