diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-12-11 23:51:29 +0100 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2018-12-17 07:52:13 -0800 |
commit | 6737f748b8edb5266c5397591b92da4c88f95dff (patch) | |
tree | c732624e9103d243ad15a35b2625351f87501187 /nitrocli/src/error.rs | |
parent | 4d314264a897c474c12e626a2be36b75dc57f5c9 (diff) | |
download | nitrocli-6737f748b8edb5266c5397591b92da4c88f95dff.tar.gz nitrocli-6737f748b8edb5266c5397591b92da4c88f95dff.tar.bz2 |
Port the status command to libnitrokey
This patch removes the raw hidapi implementation of the status command
and all utility methods that are no longer needed. With this patch, all
device communication is performed using libnitrokey.
Diffstat (limited to 'nitrocli/src/error.rs')
-rw-r--r-- | nitrocli/src/error.rs | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/nitrocli/src/error.rs b/nitrocli/src/error.rs index 5d6b266..80d9d92 100644 --- a/nitrocli/src/error.rs +++ b/nitrocli/src/error.rs @@ -26,20 +26,12 @@ use libhid; #[derive(Debug)] pub enum Error { - HidError(libhid::Error), IoError(io::Error), Utf8Error(string::FromUtf8Error), Error(String), } -impl From<libhid::Error> for Error { - fn from(e: libhid::Error) -> Error { - Error::HidError(e) - } -} - - impl From<io::Error> for Error { fn from(e: io::Error) -> Error { Error::IoError(e) @@ -57,7 +49,6 @@ impl From<string::FromUtf8Error> for Error { impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { - Error::HidError(ref e) => write!(f, "hidapi error: {}", e), Error::Utf8Error(_) => write!(f, "Encountered UTF-8 conversion error"), Error::IoError(ref e) => write!(f, "IO error: {}", e.get_ref().unwrap()), Error::Error(ref e) => write!(f, "{}", e), |