Commit ae5ccb9fc09040559b525caf6fb6dcda30a9c8be

Arne Keller 2023-10-02T20:57:40

Implement Error for SecretParseError This makes it easy to use the error with e.g. thiserror or other crates that rely on the trait.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/secret.rs b/src/secret.rs
index f9ac152..5487870 100644
--- a/src/secret.rs
+++ b/src/secret.rs
@@ -88,6 +88,8 @@ pub enum SecretParseError {
     ParseBase32,
 }
 
+impl std::error::Error for SecretParseError {}
+
 impl std::fmt::Display for SecretParseError {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {