Skip to main content

max / makenotwork

Clear three clippy lints in the notification-list paths Two needless_borrow on the &db passed to repo_notifications_muted and may_notify, and a manual_let_else in the guest sale notification. All three are -D warnings under the Sando clippy gate.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-06 15:22 UTC
Signed with PGP, not checked
Commit: c71def2413dd2d8fc02f0e8135471e607c0cb734
Parent: 71386fc
2 files changed, +5 insertions, -6 deletions
@@ -241,14 +241,14 @@
241 241 // noisy repo no longer means opting out of every repo. The account bool
242 242 // retires when its remaining reads move (GoingsOn e5b6475a).
243 243 let owner_muted = db::lists::repo_notifications_muted(
244 - &db,
244 + db,
245 245 *repo.id.as_uuid(),
246 246 owner_user.id,
247 247 db::ListKind::Issues,
248 248 )
249 249 .await
250 250 .unwrap_or(false);
251 - let owner_wants_issues = db::lists::may_notify(&db, owner_user.id, db::ListKind::Issues)
251 + let owner_wants_issues = db::lists::may_notify(db, owner_user.id, db::ListKind::Issues)
252 252 .await
253 253 .unwrap_or(true);
254 254 if sender.id != owner_user.id && owner_wants_issues && !owner_muted {
@@ -540,13 +540,12 @@
540 540 let buyer_label = guest_email.to_string();
541 541
542 542 bg.spawn("guest sale notification", async move {
543 - let seller = match db::users::get_user_by_id(&db, seller_id)
543 + let Some(seller) = db::users::get_user_by_id(&db, seller_id)
544 544 .await
545 545 .ok()
546 546 .flatten()
547 - {
548 - Some(s) => s,
549 - _ => return,
547 + else {
548 + return;
550 549 };
551 550 if !db::lists::may_notify(&db, seller.id, db::ListKind::Sale)
552 551 .await