From 0f7850e473b065cebfab55955761ccc4fff76192 Mon Sep 17 00:00:00 2001 From: fdai7375 Date: Thu, 2 Feb 2023 19:13:50 +0100 Subject: [PATCH] refactoring: fix clippy warnings in interpret function --- src/execute.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/execute.rs b/src/execute.rs index 566e055..191b510 100644 --- a/src/execute.rs +++ b/src/execute.rs @@ -10,16 +10,16 @@ use std::{io, thread}; /// This function is not directly in main.rs because it might be called by other function too (eg. /// when piping commands). pub fn interpret(line: String, config: &mut BuiltinConfig, ctrlc_recv: Receiver<()>) { - match try_interpret(line, config, ctrlc_recv.clone()) { + match try_interpret(line, config, ctrlc_recv) { Ok(_) | Err(ShellError::Interrupt) | Err(ShellError::EmptyLine) => (), Err(ShellError::NotFound(cmd)) => { eprintln!("{}: command not found", cmd.get_program().to_string_lossy()) } Err(ShellError::ExecuteFailure(msg)) => { - eprintln!("{}", msg) + eprintln!("{msg}") } Err(ShellError::MalformedArgs(args)) => { - eprintln!("Malformed arguments: {}", args) + eprintln!("Malformed arguments: {args}") } } }