aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/error.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6c5ebf3..d2982a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
- Remove the `test-pro` and `test-storage` features.
- Implement `Display` for `Version`.
- Introduce `DEFAULT_ADMIN_PIN` and `DEFAULT_USER_PIN` constants.
+- Implement `std::error::Error` for `CommandError`.
# 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 6aeeef8..dcaa4d2 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,4 +1,5 @@
use std::borrow;
+use std::error;
use std::fmt;
use std::os::raw;
@@ -79,6 +80,8 @@ impl CommandError {
}
}
+impl error::Error for CommandError {}
+
impl fmt::Display for CommandError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.as_str())