From daf2e1ab84d270581ceb507356677bd016fcf614 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 15 Jul 2023 22:18:45 +0300 Subject: [PATCH] fix clippy --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index f60918d..f7c8519 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,7 @@ use clap::crate_version; use clap::Parser; fn pick(picker: &str, derivations: &[&str]) -> Option { - let mut picker_process = Command::new(&picker) + let mut picker_process = Command::new(picker) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .spawn() @@ -50,7 +50,7 @@ fn run_command_or_open_shell(use_channel: bool, choice: &str, command: &str, tra run_cmd.args([format!("{}#{}", nixpkgs_flake, choice)]); } - if command != "" { + if !command.is_empty() { run_cmd.args(["--command", command]); run_cmd.args(trail); };