Skip to content

Commit 7720070

Browse files
author
Tyera Eulberg
committed
Extend build_rpc_trait fix to pubsub
1 parent ab4ad0f commit 7720070

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

macros/src/auto_args.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ macro_rules! build_rpc_trait {
188188
)*
189189
);
190190

191-
$(
192-
$(#[doc=$sub_doc])*
193-
fn $sub_name ( $($sub_p)* );
194-
$(#[doc=$unsub_doc])*
195-
fn $unsub_name ( $($unsub_p)* ) -> $sub_result <$sub_out $(, $error_unsub)* >;
196-
)*
191+
build_rpc_trait!(GENERATE_FUNCTIONS
192+
$(
193+
$(#[doc=$sub_doc])*
194+
fn $sub_name ( $( $sub_p )* );
195+
$(#[doc=$unsub_doc])*
196+
fn $unsub_name ( $( $unsub_p )* ) -> $sub_result <$sub_out $(, $error_unsub) *>;
197+
)*
198+
);
197199

198200
/// Transform this into an `IoDelegate`, automatically wrapping
199201
/// the parameters.
@@ -227,12 +229,12 @@ macro_rules! build_rpc_trait {
227229
(GENERATE_FUNCTIONS
228230
$(
229231
$( #[doc=$m_doc:expr] )*
230-
fn $m_name: ident (&self $(, $p: ty)* ) -> $result: ty;
232+
fn $m_name: ident (&self $(, $p: ty)* ) $( -> $result: ty)*;
231233
)*
232234
) => {
233235
$(
234236
$(#[doc=$m_doc])*
235-
fn $m_name (&self $(, _: $p )* ) -> $result;
237+
fn $m_name (&self $(, _: $p )* ) $( -> $result)*;
236238
)*
237239
};
238240

0 commit comments

Comments
 (0)