From b50ba9eebad1bedf5741ad5415fa9fcef1f21b97 Mon Sep 17 00:00:00 2001 From: iff Date: Sun, 8 Dec 2024 02:17:43 +0100 Subject: [PATCH] chore: remove useless code --- src/suggestions.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/suggestions.rs b/src/suggestions.rs index 32fd756..5cf5444 100644 --- a/src/suggestions.rs +++ b/src/suggestions.rs @@ -305,19 +305,15 @@ pub fn run_suggestion(data: &Data, command: &str) -> std::process::ExitStatus { .arg(command) .stdout(stderr()) .stderr(Stdio::inherit()) - .spawn() - .expect("failed to execute process") - .wait() - .unwrap(), + .status() + .expect("failed to execute process"), None => std::process::Command::new(shell) .arg("-c") .arg(command) .stdout(stderr()) .stderr(Stdio::inherit()) - .spawn() - .expect("failed to execute process") - .wait() - .unwrap(), + .status() + .expect("failed to execute process"), } }