mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +00:00
Unwrap
in Confirmer
task if failed to read
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
b2bf065a2b
commit
9349fbabdc
1 changed files with 1 additions and 3 deletions
|
@ -40,9 +40,7 @@ impl ConfirmerInner {
|
||||||
stdout.flush().unwrap();
|
stdout.flush().unwrap();
|
||||||
|
|
||||||
input.clear();
|
input.clear();
|
||||||
if stdin.read_line(&mut input).is_err() {
|
stdin.read_line(&mut input).unwrap();
|
||||||
break Err(BinstallError::UserAbort);
|
|
||||||
}
|
|
||||||
|
|
||||||
match input.as_str().trim() {
|
match input.as_str().trim() {
|
||||||
"yes" | "y" | "YES" | "Y" => break Ok(()),
|
"yes" | "y" | "YES" | "Y" => break Ok(()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue