fix: resolve all clippy warnings — redundant closures, dead code, collapsible_if, needless borrow
Some checks failed
lint / lint (push) Has been cancelled
test / unit (push) Has been cancelled
test / integration (push) Has been cancelled
lint / lint (pull_request) Failing after 9m25s
test / unit (pull_request) Successful in 16m57s
test / integration (pull_request) Failing after 17m29s

This commit is contained in:
2026-05-14 16:33:34 +02:00
parent 10c4a66de5
commit 550865bad4
16 changed files with 43 additions and 27 deletions

View File

@@ -95,7 +95,7 @@ fn row_to_entry(r: FeedRow) -> FeedEntry {
in_reply_to_id: r.in_reply_to_id.map(ThoughtId::from_uuid),
in_reply_to_url: r.in_reply_to_url,
ap_id: r.t_ap_id,
visibility: Visibility::from_str(&r.visibility),
visibility: Visibility::from_db_str(&r.visibility),
content_warning: r.content_warning,
sensitive: r.sensitive,
local: r.t_local,

View File

@@ -77,7 +77,7 @@ impl FollowRepository for PgFollowRepository {
.map(|o| o.map(|r| Follow {
follower_id: UserId::from_uuid(r.follower_id),
following_id: UserId::from_uuid(r.following_id),
state: FollowState::from_str(&r.state),
state: FollowState::from_db_str(&r.state),
ap_id: r.ap_id,
created_at: r.created_at,
}))

View File

@@ -62,7 +62,7 @@ impl NotificationRepository for PgNotificationRepository {
.map(|r| Notification {
id: NotificationId::from_uuid(r.id),
user_id: UserId::from_uuid(r.user_id),
notification_type: NotificationType::from_str(&r.r#type),
notification_type: NotificationType::from_db_str(&r.r#type),
from_user_id: r.from_user_id.map(UserId::from_uuid),
thought_id: r.thought_id.map(ThoughtId::from_uuid),
read: r.read,

View File

@@ -45,7 +45,7 @@ impl From<ThoughtRow> for Thought {
in_reply_to_id: r.in_reply_to_id.map(ThoughtId::from_uuid),
in_reply_to_url: r.in_reply_to_url,
ap_id: r.ap_id,
visibility: Visibility::from_str(&r.visibility),
visibility: Visibility::from_db_str(&r.visibility),
content_warning: r.content_warning,
sensitive: r.sensitive,
local: r.local,