Skip to content

Commit

Permalink
fix jsonrpc/tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hozan23 committed Oct 12, 2024
1 parent c2c4cb0 commit f9036b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
12 changes: 6 additions & 6 deletions jsonrpc/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)*
Expand Down Expand Up @@ -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)*
Expand Down

0 comments on commit f9036b9

Please sign in to comment.