From 6e46f6602240bb5777ca543d9dafd3a49e349563 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 14 Nov 2024 01:14:47 +1100 Subject: [PATCH] Fix confusing `.expect` msg Signed-off-by: Jiahao XU --- crates/bin/src/gh_token.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/bin/src/gh_token.rs b/crates/bin/src/gh_token.rs index fb63a346..9cc7adeb 100644 --- a/crates/bin/src/gh_token.rs +++ b/crates/bin/src/gh_token.rs @@ -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?;