diff options
| author | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-19 17:33:17 +0000 |
| commit | 4304b0f336ddba7b4ec6780795059ff2066d105b (patch) | |
| tree | 10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /src/db/approvals.rs | |
| parent | e757979f1a2afdbe7146066345bb9acd19d3b151 (diff) | |
| download | aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip | |
comments: keep only what the code cannot show
Stripped every comment that described what an item does, documented its
arguments or fields, or cited the design docs (§n, I-n, m-n, decision n).
2247 comments down to 83.
What survives: the section dividers that segment the large modules, the
secret-handling warnings, the agent wire-frame directions, and the few notes
without which the code they attach to reads as redundant, reorderable, or
unsound.
Diffstat (limited to 'src/db/approvals.rs')
| -rw-r--r-- | src/db/approvals.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/db/approvals.rs b/src/db/approvals.rs index b5a9b59..ececc32 100644 --- a/src/db/approvals.rs +++ b/src/db/approvals.rs @@ -3,7 +3,6 @@ use rusqlite::{params, OptionalExtension, Transaction}; use crate::db::Db; use crate::error::Result; -/// A human decision about one candidate, ready to record. pub struct Decision<'a> { pub candidate_id: i64, pub base_release_id: Option<i64>, @@ -15,7 +14,6 @@ pub struct Decision<'a> { pub note: Option<&'a str>, } -/// Record a decision on a candidate and return the approval row's id. pub fn record_in(tx: &mut Transaction<'_>, d: &Decision<'_>) -> Result<i64> { tx.execute( "INSERT INTO approval (candidate_id, base_release_id, decided_at, decision, risk_level, @@ -35,9 +33,6 @@ pub fn record_in(tx: &mut Transaction<'_>, d: &Decision<'_>) -> Result<i64> { Ok(tx.last_insert_rowid()) } -/// Record a rejection by copying the candidate's own row into the approval -/// table. The decision has to describe the bytes that *were* rejected, so it is -/// read from the row rather than repeated by the caller (§7.1). pub fn record_rejection_in(tx: &mut Transaction<'_>, candidate_id: i64, at: &str, identity_hash: &str, note: &str) -> Result<()> { tx.execute( "INSERT INTO approval (candidate_id, base_release_id, decided_at, decision, risk_level, @@ -49,7 +44,6 @@ pub fn record_rejection_in(tx: &mut Transaction<'_>, candidate_id: i64, at: &str Ok(()) } -/// The decision recorded against a candidate, if one was. pub fn for_candidate(db: &Db, candidate_id: i64) -> Result<Option<(i64, String)>> { db.read(|c| { Ok(c.query_row( |
