dialoguer 0.11

This commit is contained in:
Jack Grigg
2024-07-30 05:27:06 +00:00
parent 6452fa0540
commit d6729e99ba
5 changed files with 16 additions and 6 deletions
+3 -3
View File
@@ -274,10 +274,10 @@ pub(crate) fn disconnect_without_reset(yubikey: YubiKey) {
let _ = yubikey.disconnect(pcsc::Disposition::LeaveCard);
}
fn request_pin<E>(
mut prompt: impl FnMut(Option<String>) -> io::Result<Result<SecretString, E>>,
fn request_pin<E, E2>(
mut prompt: impl FnMut(Option<String>) -> Result<Result<SecretString, E>, E2>,
serial: Serial,
) -> io::Result<Result<SecretString, E>> {
) -> Result<Result<SecretString, E>, E2> {
let mut prev_error = None;
loop {
prev_error = Some(match prompt(prev_error)? {