Fix confusing .expect msg

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-11-14 01:14:47 +11:00
parent 4c46446ee5
commit 6e46f66022
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -59,12 +59,7 @@ impl CommandExt for Command {
let mut child = self.spawn()?;
if let Some(input) = input {
child
.stdin
.take()
.expect("Failed to open stdin")
.write_all(input)
.await?;
child.stdin.take().unwrap().write_all(input).await?;
}
let Output { status, stdout, .. } = child.wait_with_output().await?;