From 04fa8381f55e4067661c7653ee028dbb1f4afe43 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 20 Dec 2022 21:59:54 -0500 Subject: [PATCH] Fix clippy warnings --- src/command.rs | 4 ++-- src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command.rs b/src/command.rs index 17b1056..e329d54 100644 --- a/src/command.rs +++ b/src/command.rs @@ -40,7 +40,7 @@ pub fn command_event_loop( match command_request_receiver.recv() { Ok(command_request) => { event_sender.send(EventMessage::CommandCompleted( - match run_inner(command_request) { + match run_inner(&command_request) { Ok(c) => { // If there was no stdout and the command failed, don't touch stdout if !c.status_success && c.stdout.len_bytes() == 0 { @@ -62,7 +62,7 @@ pub fn command_event_loop( } } -fn run_inner(command_request: CommandRequest) -> Result { +fn run_inner(command_request: &CommandRequest) -> Result { // Spawn the child let mut child = { let request = command_request.0.read(); diff --git a/src/main.rs b/src/main.rs index d090698..1c8cf75 100644 --- a/src/main.rs +++ b/src/main.rs @@ -423,9 +423,9 @@ fn run_app(terminal: &mut Terminal, app: App) -> Result { command_options.command_result = Some(CommandResult { status_success: false, - stderr: stderr, + stderr, stdout: Rope::from_str(""), - }) + }); } }, }