We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Error
CheckError
1 parent 697b207 commit 6d3bd17Copy full SHA for 6d3bd17
sha-crypt/src/errors.rs
@@ -58,6 +58,20 @@ pub enum CheckError {
58
HashMismatch,
59
}
60
61
+#[cfg(feature = "simple")]
62
+impl core::error::Error for CheckError {}
63
+
64
65
+impl fmt::Display for CheckError {
66
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
67
+ match self {
68
+ Self::InvalidFormat(e) => write!(f, "invalid format: {e}"),
69
+ Self::Crypt(e) => write!(f, "cryptographic error: {e}"),
70
+ Self::HashMismatch => write!(f, "hash mismatch"),
71
+ }
72
73
+}
74
75
/// Decoding errors.
76
#[cfg(feature = "simple")]
77
#[derive(Debug)]
0 commit comments