Skip to content

Remove unused dependencies and dead code - #16

Merged
tamirelazar merged 2 commits into
devfrom
chore/dead-code
Jun 12, 2026
Merged

Remove unused dependencies and dead code#16
tamirelazar merged 2 commits into
devfrom
chore/dead-code

Conversation

@tamirelazar

Copy link
Copy Markdown
Owner

Summary

  • cargo-machete pass: removed getrandom (zero references in src/tests/benches/examples; the wasm crate declares its own copy)
  • dead-code sweep: audited all 46 allow(dead_code) sites — deleted unreachable items (OverlayData, BLOCK_SHAPE_TABLE, two unused serpentine constants), removed ~39 stale attributes from items that are actually in use, converted one test-only method to cfg_attr(not(test), allow(dead_code))
  • net -189 lines, no logic changes, goldens untouched

Kept for a future API decision (each documented as reserved): config_manager::load_config, TerminalRenderer::{reset_error_diffusion, resize_error_diffusion, stdout_mut}, InputPoller::{poll_keypress, poll_mouse_event}, GridRenderer::blend_with.

Verification

  • cargo fmt --check, cargo clippy -- -D warnings (default + all-features)
  • cargo test --lib: 752 passed; --all-features: 764 passed (= baseline)
  • visual regression: 46 passed, golden files byte-identical

Delete provably unused items (OverlayData, BLOCK_SHAPE_TABLE, unused
serpentine coefficients) and drop stale allow(dead_code) attributes
from items that are now in use. The one genuinely test-only helper
(FrameBuffer::max_brightness) is narrowed to
cfg_attr(not(test), allow(dead_code)).
@tamirelazar
tamirelazar merged commit 4280a51 into dev Jun 12, 2026
3 checks passed
@tamirelazar
tamirelazar deleted the chore/dead-code branch June 12, 2026 18:06
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.

1 participant