diff options
author | a-kenji <aks.kenji@protonmail.com> | 2021-05-18 09:45:03 +0200 |
---|---|---|
committer | a-kenji <aks.kenji@protonmail.com> | 2021-05-18 09:45:03 +0200 |
commit | dc067580f3df50bff17aee48fb330c164084c6bd (patch) | |
tree | 3b83041d68fe0135df8408b5695a5c37f542f2c8 /src | |
parent | 197f31875646a5b78abd23edecee072931b2b14b (diff) |
Fix Clippy Suggestions
Diffstat (limited to 'src')
-rw-r--r-- | src/client/mod.rs | 4 | ||||
-rw-r--r-- | src/common/ipc.rs | 2 | ||||
-rw-r--r-- | src/common/screen.rs | 5 | ||||
-rw-r--r-- | src/server/mod.rs | 6 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index 862c13ccf..f148a50a4 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -88,8 +88,8 @@ pub fn start_client(mut os_input: Box<dyn ClientOsApi>, 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 129727a1a..af6dd8591 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<CliArgs>, Box<Options>), Action(Action), } diff --git a/src/common/screen.rs b/src/common/screen.rs index 62fcec195..d2030243d 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<ScreenInstruction>, max_panes: Option<usize>, full_screen_ws: PositionAndSize, - config_options: Options, + config_options: Box<Options>, ) { 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 fdaeead11..12cc22299 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<CliArgs>, Box<Options>), Render(Option<String>), UnblockInputThread, ClientExit, @@ -186,8 +186,8 @@ pub fn start_server(os_input: Box<dyn ServerOsApi>, socket_path: PathBuf) { fn init_session( os_input: Box<dyn ServerOsApi>, - opts: CliArgs, - config_options: Options, + opts: Box<CliArgs>, + config_options: Box<Options>, to_server: SenderWithContext<ServerInstruction>, full_screen_ws: PositionAndSize, ) -> SessionMetaData { |