clean code with clippy
This commit is contained in:
@@ -115,7 +115,7 @@ ORDER BY name
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -134,7 +134,7 @@ ORDER BY name
|
||||
}
|
||||
|
||||
pub async fn update_pw(&self, db: &SqlitePool, pw: &str) {
|
||||
let pw = Self::get_hashed_pw(&pw);
|
||||
let pw = Self::get_hashed_pw(pw);
|
||||
sqlx::query!("UPDATE user SET pw = ? where id = ?", pw, self.id)
|
||||
.execute(db)
|
||||
.await
|
||||
|
Reference in New Issue
Block a user