From 7ccfb9a8f96b6f3000f36bdf76d95a4f6afd2826 Mon Sep 17 00:00:00 2001 From: aur-build Date: Sat, 21 Nov 2026 11:05:43 +0000 Subject: db: delete two candidate queries nothing in production calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `open_reviews_for` and `reopen_rejected` were both declared in `db`, both re-exported by `review::candidates`, and both reached by nobody in `src`. The auditor found them; the reason they stayed invisible is in the next commit. `reopen_rejected` is simply gone: no caller, no test, nothing to lose. `open_reviews_for` was a test convenience — `tests/detect.rs` used it to fetch "the pending candidate for this pkgbase". The production query `pending` already returns pending candidates and `CandidateRow` carries `pkgbase_id`, so the test now filters that instead. Same assertion, same rows, one fewer public function that existed only because a test wanted it. --- src/review/candidates.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/review/candidates.rs') diff --git a/src/review/candidates.rs b/src/review/candidates.rs index 59db99b..236f85b 100644 --- a/src/review/candidates.rs +++ b/src/review/candidates.rs @@ -2,8 +2,8 @@ use crate::db::{self, candidates as sql, Db, Pkgbase, ReleaseRow}; use crate::error::Result; pub use crate::db::candidates::{ - all as all_candidates, by_id as candidate_by_id, mark_viewed, open_reviews_for, pending as pending_candidates, - reopen_rejected, set_diff_digest, NewCandidate, + all as all_candidates, by_id as candidate_by_id, mark_viewed, pending as pending_candidates, + set_diff_digest, NewCandidate, }; #[derive(Debug, Clone, PartialEq, Eq)] -- cgit v1.2.3