Fix clippy warnings
This commit is contained in:
parent
d188897c3f
commit
04fa8381f5
@ -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<CommandResult> {
|
||||
fn run_inner(command_request: &CommandRequest) -> Result<CommandResult> {
|
||||
// Spawn the child
|
||||
let mut child = {
|
||||
let request = command_request.0.read();
|
||||
|
@ -423,9 +423,9 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, app: App) -> Result<Option<St
|
||||
None => {
|
||||
command_options.command_result = Some(CommandResult {
|
||||
status_success: false,
|
||||
stderr: stderr,
|
||||
stderr,
|
||||
stdout: Rope::from_str(""),
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user