Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

chore(rust): drop the dead-code allowances that were silencing nothing (#280)

2 months ago

16ec9b3
Authored
Davy7/26/2026, 11:34:09 PM
* chore(rust): drop the dead-code allowances that were silencing nothing

The tree carried 79 #[allow(dead_code)] attributes. Removing all of them
and recompiling shows the compiler only objects to 58 - the other 21
suppressed a warning that no longer exists, which means they were also
hiding any *new* dead code in those items.

Removed only the provably stale ones: an attribute is dropped when
neither the item it guards nor any member of that item appears in the
compiler's list. cargo clippy --all-targets -- -D warnings is clean
afterwards, which is the proof.

Nothing was deleted beyond the attributes themselves.

The 58 that remain are load-bearing: roughly 44 of them sit in
src/remote/, where a sizeable amount of the control plane is genuinely
unreferenced. Several carry comments saying so deliberately ("retained
for non-TX call sites / future callers"). Deciding what of that ships in
1.0 is a product call, not a lint cleanup.

* chore(rust): keep the window-shell allowances that Linux still needs

The Mac enum variants are only constructed under cfg(target_os =
"macos"), so removing their allowances was clean on macOS and dead-code
errors on Linux. Their doc comment already explained why they exist -
serde parity so the frontend sees the same payload shape on every
platform - which is exactly the case a macOS-only check cannot see.

Parent1672daf

6 files changed
  • src-tauri/src/remote/control_db.rs+0−4
  • src-tauri/src/remote/errors.rs+0−5
  • src-tauri/src/remote/google_drive.rs+0−5
  • src-tauri/src/remote/provider.rs+0−1
  • src-tauri/src/services/playback_source.rs+0−1
  • src-tauri/src/services/reconnect.rs+0−2