Skip to content

chore(tech-debt): remove dead code + tighten clippy CI#194

Merged
intendednull merged 1 commit into
mainfrom
claude/dreamy-planck-xvu4c
Apr 24, 2026
Merged

chore(tech-debt): remove dead code + tighten clippy CI#194
intendednull merged 1 commit into
mainfrom
claude/dreamy-planck-xvu4c

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Summary

Audit-driven cleanup: delete dead code surfaced by an audit pass on
main, modernize a tiny util, fix test-file clippy warnings, and close
the CI gap that let them land.

  • Dead code

    • crates/replay/src/role.rs — delete unused
      ServerData.max_events_per_author field (assigned but never read;
      the config value is captured in a local binding instead).
    • crates/web/src/palette_recents.rs — delete
      set_remember_enabled (no callers anywhere).
  • Modernize

    • crates/client/src/base64.rs — use div_ceil(3) /
      is_multiple_of(4) (stable); drops two clippy::manual_* allows.
  • Test-only clippy fixes (wouldn't fire under today's CI — see
    below)

    • crates/worker/tests/integration.rs — collapse three nested
      if lets the collapsible_match lint was flagging.
    • crates/web/tests/browser.rs — drop a
      m.author_peer_id = m.author_peer_id no-op self-assignment.
  • CI gap

    • .github/workflows/ci.yml + justfile — run clippy with
      --all-targets so test-only warnings don't slip past review. The
      two fixes above would have been caught by CI with this change.

Test plan

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo check --target wasm32-unknown-unknown (via just check-wasm)

Scope notes

Deliberately avoided touching crates/web/src/state.rs and
crates/client/src/storage.rs — stale #[allow(dead_code)]
annotations and a dead save_download helper there also qualify for
deletion, 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

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
@intendednull intendednull merged commit 7600f95 into main Apr 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants