chore: add pre-commit fmt+clippy hooks, fix clippy warnings

This commit is contained in:
2026-05-17 12:09:24 +02:00
parent d813e59b5c
commit 2d1044e5c3
3 changed files with 27 additions and 7 deletions

View File

@@ -135,7 +135,9 @@ pub async fn get_thought_view(
.find_by_id(&thought.user_id)
.await?
.ok_or(DomainError::NotFound)?;
let mut map = engagement.get_for_thoughts(&[id.clone()], viewer).await?;
let mut map = engagement
.get_for_thoughts(std::slice::from_ref(id), viewer)
.await?;
let (stats, viewer_ctx) = map.remove(id).unwrap_or((
EngagementStats {
like_count: 0,