diff --git a/src/client/mod.rs b/src/client/mod.rs index 862c13cc..f148a50a 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -88,8 +88,8 @@ pub fn start_client(mut os_input: Box, opts: CliArgs, config: C os_input.connect_to_server(&*ZELLIJ_IPC_PIPE); os_input.send_to_server(ClientToServerMsg::NewClient( full_screen_ws, - opts, - config_options, + Box::new(opts), + Box::new(config_options), )); os_input.set_raw_mode(0); let _ = os_input diff --git a/src/common/ipc.rs b/src/common/ipc.rs index 129727a1..af6dd859 100644 --- a/src/common/ipc.rs +++ b/src/common/ipc.rs @@ -47,7 +47,7 @@ pub enum ClientToServerMsg { DisconnectFromSession,*/ ClientExit, TerminalResize(PositionAndSize), - NewClient(PositionAndSize, CliArgs, Options), + NewClient(PositionAndSize, Box, Box), Action(Action), } diff --git a/src/common/screen.rs b/src/common/screen.rs index 62fcec19..d2030243 100644 --- a/src/common/screen.rs +++ b/src/common/screen.rs @@ -325,11 +325,14 @@ impl Screen { } } +// The box is here in order to make the +// NewClient enum smaller +#[allow(clippy::boxed_local)] pub fn screen_thread_main( bus: Bus, max_panes: Option, full_screen_ws: PositionAndSize, - config_options: Options, + config_options: Box, ) { let colors = bus.os_input.as_ref().unwrap().load_palette(); let capabilities = config_options.simplified_ui; diff --git a/src/server/mod.rs b/src/server/mod.rs index fdaeead1..12cc2229 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -27,7 +27,7 @@ use route::route_thread_main; /// ones sent by client to server #[derive(Debug, Clone)] pub enum ServerInstruction { - NewClient(PositionAndSize, CliArgs, Options), + NewClient(PositionAndSize, Box, Box), Render(Option), UnblockInputThread, ClientExit, @@ -186,8 +186,8 @@ pub fn start_server(os_input: Box, socket_path: PathBuf) { fn init_session( os_input: Box, - opts: CliArgs, - config_options: Options, + opts: Box, + config_options: Box, to_server: SenderWithContext, full_screen_ws: PositionAndSize, ) -> SessionMetaData {