summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-21 17:07:56 +0000
committeraur-build <aur-build@localhost>2026-11-21 17:07:56 +0000
commit689b82bfe36660c18cbce66a3f05550c4d02dc12 (patch)
treee5b6fcdea7add1cdb017432fcec9b063c6a045c1 /src
parentd96a46ea15cfb7b47ed7b53d2b0465f20fc9b43e (diff)
downloadaur-build-689b82bfe36660c18cbce66a3f05550c4d02dc12.tar.gz
aur-build-689b82bfe36660c18cbce66a3f05550c4d02dc12.zip
error,tools: a variant nothing constructed, and three tool constructs nothing read
`Missing::Snapshot` was declared, rendered by the `Display` arm, and constructed by nothing: `From<&str> for Missing` routes a bare sentence to `Missing::Other`, and the test that mentions a snapshot asserts `Other(_)`. The variant and its formatting arm are gone. A variant scan that counted *mentions* could not see it, because the formatting arm is a mention; the scan now ignores a line that only renders the variant, and what it reports afterwards is `Error::Json` and `Error::Sqlite`, both of which the compiler proves live — deleting either breaks the hundred-odd `?` sites that reach them through `#[from]`. Three survivors in `tools/`, none of them caught by the audit that claimed the axis was empty, because that audit looked at module-level constants and function parameters and never at local bindings: - `test-surface.py` opened `render()` with `out = [...] if False else []`, a literal dead branch whose binding was then never read. Both gone. - `test-surface.py` computed a `collisions` set that nothing consulted; the rule it narrated had moved into `mentioned` as `sole_owner`. The set is deleted and the explanation now sits in the docstring of the function that applies it. - `release-surface-probe.py` built `decl_line` and used `decl_no` instead. `a, b = item.split(" as ", 1)` became `_, b = ..` for the same reason. The scans now cover locals and constant conditions as well, and report nothing: no unread binding, no `if False`, no unreachable statement after a terminator, no unused import, constant, parameter, or unread argparse option across the five tools.
Diffstat (limited to 'src')
-rw-r--r--src/error.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs
index 8dee79f..2159d46 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -13,7 +13,6 @@ pub enum Missing {
Candidate(i64),
Release(i64),
Build(String),
- Snapshot,
/// A path the mirror's tree listing did not contain at that commit.
MirrorPath(String),
/// The single `repo` row is absent — nothing has been initialised yet.
@@ -29,7 +28,6 @@ impl fmt::Display for Missing {
Missing::Candidate(id) => write!(f, "candidate {id}"),
Missing::Release(id) => write!(f, "no release {id}"),
Missing::Build(id) => write!(f, "build {id}"),
- Missing::Snapshot => write!(f, "snapshot"),
Missing::MirrorPath(p) => write!(f, "{p} not in mirror"),
Missing::RepoRow => write!(f, "no repo row; run `aur-build init`"),
Missing::Other(s) => write!(f, "{s}"),