Skip to content

Commit 54d68a4

Browse files
authored
password-auth: derive Eq/PartialEq on *Error (#433)
Derives these traits for the following types: - `ParseError` - `VerifyError`
1 parent 5e7e8c7 commit 54d68a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

password-auth/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use core::fmt;
77
// This type has no public constructor and deliberately keeps
88
// `password_hash::Error` out of the public API so it can evolve
99
// independently (e.g. get to 1.0 faster)
10-
#[derive(Clone, Copy)]
10+
#[derive(Clone, Copy, Eq, PartialEq)]
1111
pub struct ParseError(password_hash::Error);
1212

1313
impl ParseError {
@@ -32,7 +32,7 @@ impl fmt::Display for ParseError {
3232
}
3333

3434
/// Password verification errors.
35-
#[derive(Clone, Copy, Debug)]
35+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
3636
pub enum VerifyError {
3737
/// Password hash parsing errors.
3838
Parse(ParseError),

0 commit comments

Comments
 (0)