Skip to content
Snippets Groups Projects
Verified Commit 2873f401 authored by Yaroslav Dynnikov's avatar Yaroslav Dynnikov
Browse files

chore: minify tarantool_main macro use

parent b25249ff
No related branches found
No related tags found
1 merge request!74Refactor tarantool_main macro
Pipeline #3971 passed
...@@ -194,7 +194,7 @@ struct IpcMessage { ...@@ -194,7 +194,7 @@ struct IpcMessage {
macro_rules! tarantool_main { macro_rules! tarantool_main {
( (
$tt_args:expr, $tt_args:expr,
callback_data: $cb_data:ident, callback_data: $cb_data:tt,
callback_data_type: $cb_data_ty:ty, callback_data_type: $cb_data_ty:ty,
callback_body: $cb_body:expr callback_body: $cb_body:expr
) => {{ ) => {{
...@@ -252,15 +252,12 @@ fn main_run(args: args::Run) -> ExitStatus { ...@@ -252,15 +252,12 @@ fn main_run(args: args::Run) -> ExitStatus {
ForkResult::Child => { ForkResult::Child => {
drop(rx); drop(rx);
let tt_args = args.tt_args().unwrap();
let data = (entrypoint, args, tx);
let rc = tarantool_main!( let rc = tarantool_main!(
tt_args, args.tt_args().unwrap(),
callback_data: data, callback_data: (entrypoint, args, tx),
callback_data_type: (Entrypoint, args::Run, ipc::Sender<IpcMessage>), callback_data_type: (Entrypoint, args::Run, ipc::Sender<IpcMessage>),
callback_body: { callback_body: {
let (entrypoint, args, to_supervisor) = data; entrypoint.exec(args, tx)
entrypoint.exec(args, to_supervisor)
} }
); );
return ExitStatus { raw: rc }; return ExitStatus { raw: rc };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment