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.
1 parent f913693 commit 5ceb1b3Copy full SHA for 5ceb1b3
src/errors.rs
@@ -11,7 +11,7 @@ pub(crate) fn new_error(kind: ErrorKind) -> Error {
11
pub type Result<T> = result::Result<T, Error>;
12
13
/// An error that can occur when encoding/decoding JWTs
14
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
15
pub struct Error(Box<ErrorKind>);
16
17
impl Error {
@@ -133,6 +133,9 @@ impl PartialEq for ErrorKind {
133
}
134
135
136
+// Equality of ErrorKind is an equivalence relation: it is reflexive, symmetric and transitive.
137
+impl Eq for ErrorKind {}
138
+
139
impl From<base64::DecodeError> for Error {
140
fn from(err: base64::DecodeError) -> Error {
141
new_error(ErrorKind::Base64(err))
0 commit comments