aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-17 14:00:54 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-20 21:08:52 +0000
commit17f9c30a0ace070cba856e4e89fcccedcab5e8e6 (patch)
tree0cb5df3150c152f1bf16383e77592d155815e73d
parent70e886d3ca487c306b8eced9f0e067a67ba9c1bb (diff)
downloadnitrokey-rs-17f9c30a0ace070cba856e4e89fcccedcab5e8e6.tar.gz
nitrokey-rs-17f9c30a0ace070cba856e4e89fcccedcab5e8e6.tar.bz2
Remove the unused CommandError::Undefined variant
The CommandError::Undefined variant has been refactored into Error::UnexpectedError and CommunicationError::NotConnected and is therefore no longer needed.
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/error.rs3
2 files changed, 1 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1856336..a4df5c6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@
`CommandError::Unknown` variant to `Error::Unknown`.
- Return `CommunicationError::NotConnected` instead of
`CommandError::Undefined` from the connect functions.
+ - Remove the `CommandError::Undefined` variant.
# v0.3.4 (2019-01-20)
- Fix authentication methods that assumed that `char` is signed.
diff --git a/src/error.rs b/src/error.rs
index b27124c..cde9a34 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -111,8 +111,6 @@ pub enum CommandError {
UnknownCommand,
/// AES decryption failed.
AesDecryptionFailed,
- /// An unspecified error occurred.
- Undefined,
}
impl CommandError {
@@ -151,7 +149,6 @@ impl fmt::Display for CommandError {
CommandError::NotSupported => "This command is not supported by this device",
CommandError::UnknownCommand => "This command is unknown",
CommandError::AesDecryptionFailed => "AES decryption failed",
- CommandError::Undefined => "An unspecified error occurred",
})
}
}