diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-30 19:20:37 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2019-07-14 13:49:49 +0000 |
commit | d4efc5026fd96c3e19df928cfdbed2774c04d743 (patch) | |
tree | 4b56b8c2ec042137eeb74743bf351db96dac0853 /nitrocli/src/error.rs | |
parent | bccf3d17ac2376a2b297491212bf53e54d71f76c (diff) | |
download | nitrocli-d4efc5026fd96c3e19df928cfdbed2774c04d743.tar.gz nitrocli-d4efc5026fd96c3e19df928cfdbed2774c04d743.tar.bz2 |
Replace nitrokey::CommandError with nitrokey::Error
Previously, CommandError was nitrokey-rs’s main error type. Since
nitrokey-rs v0.4.0, Error replaced CommandError, which now is an Error
variant. This patch changes the error handling code in nitrocli to work
with the new Error type.
Diffstat (limited to 'nitrocli/src/error.rs')
-rw-r--r-- | nitrocli/src/error.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nitrocli/src/error.rs b/nitrocli/src/error.rs index 1346526..f18d1a1 100644 --- a/nitrocli/src/error.rs +++ b/nitrocli/src/error.rs @@ -25,7 +25,7 @@ use std::string; #[derive(Debug)] pub enum Error { ArgparseError(i32), - CommandError(Option<&'static str>, nitrokey::CommandError), + CommandError(Option<&'static str>, nitrokey::Error), IoError(io::Error), Utf8Error(str::Utf8Error), Error(String), @@ -37,8 +37,8 @@ impl From<&str> for Error { } } -impl From<nitrokey::CommandError> for Error { - fn from(e: nitrokey::CommandError) -> Error { +impl From<nitrokey::Error> for Error { + fn from(e: nitrokey::Error) -> Error { Error::CommandError(None, e) } } |