chore(tech-debt): remove dead code + tighten clippy CI#194
Merged
Conversation
Surfaced during tech-debt audit on main: - crates/replay/src/role.rs: delete unused `max_events_per_author` field on ServerData (assigned but never read; config value is captured in local binding instead). - crates/web/src/palette_recents.rs: delete `set_remember_enabled` (no callers anywhere; defaulted to `true` via `remember_enabled`). - crates/client/src/base64.rs: use `div_ceil(3)` / `is_multiple_of(4)` (stable) instead of manual arithmetic; drops two clippy::manual_* allows. - crates/worker/tests/integration.rs: collapse nested `if let` matches the lint was flagging (collapsible_match × 3). - crates/web/tests/browser.rs: drop `m.author_peer_id = m.author_peer_id` no-op self-assignment in `run_collapses_same_author_within_5min`. - .github/workflows/ci.yml + justfile: run clippy with `--all-targets` so test-only warnings (both test-file fixes above would have fired in CI under `-D warnings`) don't slip past review. Verified locally: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, cargo check --target wasm32-unknown-unknown (via just check-wasm) all green. https://claude.ai/code/session_01JpAauE7enCc1t1HgsWsdN7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit-driven cleanup: delete dead code surfaced by an audit pass on
main, modernize a tiny util, fix test-file clippy warnings, and closethe CI gap that let them land.
Dead code
crates/replay/src/role.rs— delete unusedServerData.max_events_per_authorfield (assigned but never read;the config value is captured in a local binding instead).
crates/web/src/palette_recents.rs— deleteset_remember_enabled(no callers anywhere).Modernize
crates/client/src/base64.rs— usediv_ceil(3)/is_multiple_of(4)(stable); drops twoclippy::manual_*allows.Test-only clippy fixes (wouldn't fire under today's CI — see
below)
crates/worker/tests/integration.rs— collapse three nestedif lets thecollapsible_matchlint was flagging.crates/web/tests/browser.rs— drop am.author_peer_id = m.author_peer_idno-op self-assignment.CI gap
.github/workflows/ci.yml+justfile— run clippy with--all-targetsso test-only warnings don't slip past review. Thetwo fixes above would have been caught by CI with this change.
Test plan
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacecargo check --target wasm32-unknown-unknown(viajust check-wasm)Scope notes
Deliberately avoided touching
crates/web/src/state.rsandcrates/client/src/storage.rs— stale#[allow(dead_code)]annotations and a dead
save_downloadhelper there also qualify fordeletion, but those files are under heavy modification in PRs #185,
#187, #188 and a cleanup edit would conflict. They're captured in a
follow-up audit note.
https://claude.ai/code/session_01JpAauE7enCc1t1HgsWsdN7