diff --git a/src/command_runner.rs b/src/command_runner.rs index cca8207..70418d8 100644 --- a/src/command_runner.rs +++ b/src/command_runner.rs @@ -63,13 +63,9 @@ impl CommandRunner for StdCommandRunner { .stdin(Stdio::piped()) .stdout(Stdio::piped()) .stderr(Stdio::piped()) - .spawn() - .expect("Failed to spawn child process"); + .spawn()?; let stdin = child.stdin.as_mut().expect("Failed to open stdin"); - stdin - .write_all(input) - .await - .expect("Failed to write to stdin"); + stdin.write_all(input).await?; let res = child.wait_with_output().await; //println!("{:?}", res); #[allow(clippy::let_and_return)]