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
+8
View File
@@ -15,6 +15,7 @@ macro_rules! wlnfl {
pub enum Error {
CustomManagementKey,
Dialog(dialoguer::Error),
InvalidFlagCommand(String, String),
InvalidFlagTui(String),
InvalidPinPolicy(String),
@@ -35,6 +36,12 @@ pub enum Error {
YubiKey(yubikey::Error),
}
impl From<dialoguer::Error> for Error {
fn from(e: dialoguer::Error) -> Self {
Error::Dialog(e)
}
}
impl From<io::Error> for Error {
fn from(e: io::Error) -> Self {
Error::Io(e)
@@ -65,6 +72,7 @@ impl fmt::Debug for Error {
url = CHANGE_MGMT_KEY_URL
)?;
}
Error::Dialog(e) => wlnfl!(f, "err-io-user", err = e.to_string())?,
Error::InvalidFlagCommand(flag, command) => wlnfl!(
f,
"err-invalid-flag-command",