cargo fix lint

This commit is contained in:
2024-07-22 08:19:07 -07:00
parent c499672dde
commit d0a02c2f61
3 changed files with 8 additions and 16 deletions

View File

@@ -50,7 +50,8 @@ pub async fn search(
first,
last,
|after, before, first, last| async move {
let rows = sqlx::query_file!("sql/threads.sql", site, query.unread_only)
info!("search page info {after:#?}, {before:#?}, {first:#?}, {last:#?}");
let rows = sqlx::query_file!("sql/threads.sql", site, query.unread_only,)
.fetch_all(pool)
.await?;
@@ -91,10 +92,7 @@ pub async fn search(
}
pub async fn tags(pool: &PgPool, needs_unread: bool) -> Result<Vec<Tag>, ServerError> {
// TODO: write separate query for needs_unread.
let tags = sqlx::query_file!("sql/tags.sql", needs_unread)
.fetch_all(pool)
.await?;
let tags = sqlx::query_file!("sql/tags.sql").fetch_all(pool).await?;
let tags = tags
.into_iter()
.map(|tag| {