Skip to content

Commit

Permalink
Replace unstable library feature
Browse files Browse the repository at this point in the history
for more information see issue #93050:
rust-lang/rust#93050

Signed-off-by: Knut Borchers <knut.borchers@gmail.com>
  • Loading branch information
qutax committed May 8, 2023
1 parent f9ac0af commit 90b4ef7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/src/core/service/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ fn password_matches_hash(
hash: &str,
password: &str, // talisman-ignore-line
) -> bool {
argon2::verify_encoded(hash, password.as_bytes()).is_ok_and(|is_verified| is_verified)
return if let Ok(is_verified) = argon2::verify_encoded(hash, password.as_bytes()) {
is_verified
} else {
false
};
}

pub struct DefaultUserService<UR: UserRepository> {
Expand Down

0 comments on commit 90b4ef7

Please sign in to comment.