no more clones!

This commit is contained in:
2023-05-24 12:18:14 +02:00
parent 1c74d11e96
commit c91db80ce5
3 changed files with 3 additions and 4 deletions

View File

@ -113,9 +113,9 @@ ORDER BY name
//been deleted
}
match user.pw.clone() {
match user.pw.as_ref() {
Some(user_pw) => {
let password_hash = Self::get_hashed_pw(&pw);
let password_hash = &Self::get_hashed_pw(&pw);
if password_hash == user_pw {
return Ok(user);
}