Cargo clippy and cargo fmt

This commit is contained in:
Simon Goller 2024-05-09 15:00:50 +02:00
parent b0000c0117
commit ed609cf06c
22 changed files with 286 additions and 94 deletions

View file

@ -92,13 +92,10 @@ impl dao::PermissionDao for PermissionDaoImpl {
Ok(())
}
async fn find_user(&self, username: &str) -> Result<Option<dao::UserEntity>, DaoError> {
let result = query!(
r"SELECT name FROM user WHERE name = ?",
username
)
.fetch_optional(self.pool.as_ref())
.await
.map_db_error()?;
let result = query!(r"SELECT name FROM user WHERE name = ?", username)
.fetch_optional(self.pool.as_ref())
.await
.map_db_error()?;
Ok(result.map(|row| dao::UserEntity {
name: row.name.clone().into(),
}))