Repository navigation
Description
CI runs clippy only with --features dev --all-targets, so anything used only by tests or dev code never warns. cargo check --no-default-features does warn (today: TEACHER_PRESET), but CI does not fail on its warnings. First step: make that check fail on warnings, so this list cannot grow back.
allow attributes that are stale (the item is used; drop the attribute and its comment):
src/perms.rs:137 STUDENT_PRESET; src/error.rs:36, :39 NoPermission, ApiNoPermission; src/auth.rs:254 CurrentUser::require.
allow attributes hiding something dead:
src/auth.rs:260CurrentUser::require_api: only tests call it.src/share.rs:28Share.created_at;src/courses.rs:505CourseRow.created_at,.updated_at: never read ("to come"). Remove the fields and theirSELECTcolumns.src/auth/api.rs:176Grant.user_id,.client_id: never read.src/auth/api.rs:563ApiError::NotFound: never built, tests included.src/db/tables.rsUSER_TABLES,SHARED_TABLES: test-only; make the module#[cfg(test)]. The per-table conditions are not used even by its own test.
No release caller, no attribute:
| Location | Item | Only used by |
|---|---|---|
src/content/quiz_type.rs:58 |
QuizType::is_typed |
nothing |
src/ai/budget.rs:72 |
Effort::output_tokens |
tests |
src/content.rs:667 |
Lesson::html_rendered |
tests |
src/content.rs:992 |
ContentStore::has_conjugations |
the test course |
src/courses.rs:245 |
Courses::load_builtin |
tests |
src/courses.rs:356 |
Courses::builtin_store |
dev and tests |
src/jobs.rs:325 |
Queue::notify |
the dev jobs page |
src/perms.rs:100, :140 |
Perms::TEACHER, TEACHER_PRESET |
tests and dev |
src/quiz.rs:52 |
Rng::seeded |
dev and tests |
src/games.rs:234, src/tutor.rs:318, src/ai/queue.rs:178 |
three drop_user methods |
tests (mini has no account deletion) |
Gate with #[cfg(test)] or #[cfg(feature = "dev")] what tests and dev need; delete the rest.
Parameters that are always the same: editor_page(…, notice, …) always None (src/routes/courses/editor.rs:520); hear_gap(…, gap, …) always None, so its two Some arms cannot run (src/sprint.rs:540-545); leaderboard(…, limit) always 10 (src/games.rs:272).
Arms that cannot be reached:
src/sprint.rs:1202-1224and:1368: grading and describing"htype". No mini release ever dealt it andstatic/sprint.jshas no such kind. About 25 lines plussprint.describe.hear_typein six languages.src/progress.rs:53:"legacy" => "study.via.legacy". Nothing writes it.src/sprint.rs:1399-1405: three old history formats. Probably dead.src/motivators.rs:210-211:"skc"to"xp". Migration v2 already rewrites every such row.src/routes/mod.rs:392: a comment about refusing a blocked address with no code under it.
About 330 lines in all, with the routes and the settings shim in their own issues.
From the code review of 24 November 2026. Line numbers are as of 0.5.0 (2547b36).
Activity