GeezerVison is showing github.com — id: clippy-lint red on main — expect_used at src/tags.rs:1484,1499 (clippy 1.99) · Issue #2401 · developing-today/code
id: clippy-lint red on main — expect_used at src/tags.rs:1484,1499 (clippy 1.99) #2401Labels app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitive DescriptionProblem
The basic: nix flake check (clippy-lint) PR check fails on pkgs/id with two clippy::expect_used errors in code this repo has not changed:
error: used `expect()` on an `Option` value
--> src/tags.rs:1484:22
|
1484 | let ch = input[i..].chars().next().expect("i is a char boundary");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: requested on the command line with `-D clippy::expect-used`
error: used `expect()` on an `Option` value
--> src/tags.rs:1499:22
|
1499 | let ch = input[i..].chars().next().expect("i is a char boundary");
Evidence it is pre-existing, not PR-local
Impact
Every PR touching pkgs/id is unmergeable: clippy-lint is a required check. #1820 is parked on this, and other app/id work will queue behind it.
Expected fix
Either replace the two expect() calls with a non-panicking form, e.g.
let Some(ch) = input[i..].chars().next() else { break };
(the enclosing loops already break when i >= input.len()), or, if the panic is genuinely intended as an invariant, #[allow(clippy::expect_used)] with a comment — but prefer the let-else, since i is always advanced by len_utf8.
Verify with the clippy-lint check (nix build .#checks.<system>.id-clippy-lint or cargo clippy -p id --all-targets -- -D clippy::expect-used), not just cargo check: the 366 warnings in the same log are non-fatal and must not be "fixed" here.
Related
Acceptance criteria
Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) app/idPackage/app: id (pkgs/ or apps/ in this repo) on Oct 29, 2026developing-today commented on Oct 29, 2026 dezren39 commented on Oct 30, 2026 Intake review (fleet monitor, 2026-10-29 run):
dezren39 commented on Nov 3, 2026 Triage findings (queue task 3611, repo-worker-code lane bf419306, 2026-11-03):
Already resolved — recommending close. Verified against fresh origin/main (d368b9fb):
- Both offending lines (
src/tags.rs:1484,1499, .expect("i is a char boundary") on chars().next()) are gone from main. The file now lives at pkgs/id/src/tags.rs and both sites use panic-free let Some(ch) = input[i..].chars().next() else { break; } with an invariant comment.
git grep -n '.expect(' origin/main -- pkgs/id/src/tags.rs returns zero matches — no .expect( call remains in the file, so -D clippy::expect-used cannot fire on it.
- The fix arrived via PR id: rustfmt meta_client.rs + drop expect() in tags parser — unbreak main fmt/clippy (#2151) #2335 ("id: rustfmt meta_client.rs + drop expect() in tags parser", touched
pkgs/id/src/tags.rs +9/-3), merged 2026-10-30 (merge commit 9c976b8).
Caveat: could not confirm a green clippy-lint run on current main because the id workflow queue is backlogged (latest main runs all queued), and the old basic: nix flake check (clippy-lint) job name no longer exists under current workflow names. But the lint in question is deterministic on file content — with no .expect( left in the file, this exact failure cannot recur. If clippy flags anything else in pkgs/id, that would be a new issue, not this one.
No follow-up fix packet needed. Closing with evidence per the triage acceptance criteria. dezren39 commented on Nov 3, 2026
MetadataMetadataapp/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitive DevelopmentNo branches or pull requestsIssue actions
|