Fix Clippy Suggestions

This commit is contained in:
a-kenji 2021-05-18 09:45:03 +02:00
parent 197f318756
commit dc067580f3
4 changed files with 10 additions and 7 deletions

View file

@ -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

View file

@ -47,7 +47,7 @@ pub enum ClientToServerMsg {
DisconnectFromSession,*/
ClientExit,
TerminalResize(PositionAndSize),
NewClient(PositionAndSize, CliArgs, Options),
NewClient(PositionAndSize, Box<CliArgs>, Box<Options>),
Action(Action),
}

View file

@ -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;

View file

@ -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 {