From 7afffd1a0ca798dd5826c2e1881b09fe135dbcbd Mon Sep 17 00:00:00 2001 From: aur-build Date: Sat, 21 Nov 2026 13:43:30 +0000 Subject: src: delete the fields nothing reads, and the two knobs nothing obeys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The census only sees `pub` items, so the constructs below it stayed invisible until narrowing made the compiler look: rustc reported `ReviewSubject::pkgbase`, `StageB::cached` and `StageB::version` as dead the moment their structs stopped being exported, and the same question asked of every struct field, enum variant and SQL literal in the crate found six more. `BuildRow::lease_owner` and `BuildRow::priority` were selected out of the database into a row nobody read; the *columns* are live — the dispatcher leases through one and orders by the other — so the SELECT list and the row mapper lost them and the schema did not. `Pkgbase::unpinable` and `SnapshotRow::files_json` are the same shape, and `Config::git_bin` and `Config::build_user` are worse: they are knobs an operator can set, defaulted, serialized, and consulted by nothing. A setting that changes nothing is not an unimplemented feature, it is a lie in a config file, so both are gone; `a_config_init_wrote_before_the_enum_ still_loads` now proves a config that still names them loads anyway. Two axes came back empty, and both were checked rather than assumed: every string literal containing SQL is passed to a call, and the two `Error` variants that name matches never mention — `Json` and `Sqlite` — are constructed by `?` in about a hundred places, which is why they were left alone. Every template and every static asset is reachable from a route or an `extends`. --- src/db/pkgbases.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/db/pkgbases.rs') diff --git a/src/db/pkgbases.rs b/src/db/pkgbases.rs index 0f711a7..743aa43 100644 --- a/src/db/pkgbases.rs +++ b/src/db/pkgbases.rs @@ -14,7 +14,6 @@ pub struct Pkgbase { pub aur_head: Option, pub current_accepted_release_id: Option, pub state: String, - pub unpinable: bool, } fn row_to_pkgbase(r: &Row<'_>) -> rusqlite::Result { @@ -26,12 +25,11 @@ fn row_to_pkgbase(r: &Row<'_>) -> rusqlite::Result { aur_head: r.get(4)?, current_accepted_release_id: r.get(5)?, state: r.get(6)?, - unpinable: r.get::<_, i64>(7)? != 0, }) } const PKGBASE_COLS: &str = "id, name, aur_url, mirror_path, aur_head, \ - current_accepted_release_id, state, unpinable"; + current_accepted_release_id, state"; pub fn get_pkgbase(db: &Db, name: &str) -> Result> { db.read(|c| { -- cgit v1.2.3