From d4efc5026fd96c3e19df928cfdbed2774c04d743 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Wed, 30 Jan 2019 19:20:37 +0000 Subject: Replace nitrokey::CommandError with nitrokey::Error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- nitrocli/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nitrocli/src/error.rs') 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 for Error { - fn from(e: nitrokey::CommandError) -> Error { +impl From for Error { + fn from(e: nitrokey::Error) -> Error { Error::CommandError(None, e) } } -- cgit v1.2.1