From f29bb7dd3c732ed1d5d208f2cc3c0733ad7037a8 Mon Sep 17 00:00:00 2001 From: Yaroslav Dynnikov <yaroslav.dynnikov@gmail.com> Date: Mon, 25 Apr 2022 00:20:38 +0300 Subject: [PATCH] chore: rename var supervisor_ipc -> to_supervisor --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index c4c6247a7f..838cb76044 100644 --- a/src/main.rs +++ b/src/main.rs @@ -177,9 +177,9 @@ enum Entrypoint { } impl Entrypoint { - fn exec(self, supervisor_ipc: ipc::Sender<IpcMessage>, args: args::Run) { + fn exec(self, to_supervisor: ipc::Sender<IpcMessage>, args: args::Run) { match self { - Self::StartDiscover => start_discover(supervisor_ipc, &args), + Self::StartDiscover => start_discover(to_supervisor, &args), Self::StartJoin { leader_address } => start_join(&args, leader_address), } } @@ -227,8 +227,8 @@ fn main_run(args: args::Run) -> ExitStatus { extern "C" fn trampoline(data: *mut libc::c_void) { // let args = unsafe { Box::from_raw(data as _) }; let argbox = unsafe { Box::<TrampolineArgs>::from_raw(data as _) }; - let (entrypoint, supervisor_ipc, args) = *argbox; - entrypoint.exec(supervisor_ipc, args); + let (entrypoint, to_supervisor, args) = *argbox; + entrypoint.exec(to_supervisor, args); } // `argv` is a vec of pointers to data owned by `tt_args`, so @@ -283,7 +283,7 @@ fn main_run(args: args::Run) -> ExitStatus { } } -fn start_discover(supervisor_ipc: ipc::Sender<IpcMessage>, args: &args::Run) { +fn start_discover(to_supervisor: ipc::Sender<IpcMessage>, args: &args::Run) { tlog!(Info, ">>>>> start_discover()"); picolib_setup(args); @@ -333,7 +333,7 @@ fn start_discover(supervisor_ipc: ipc::Sender<IpcMessage>, args: &args::Run) { next_entrypoint, drop_db: true, }; - supervisor_ipc.send(&msg); + to_supervisor.send(&msg); std::process::exit(0); } }; -- GitLab