Skip to content

perf: remove redundant render clones - #4

Merged
matheuseabra merged 1 commit into
mainfrom
codex/rust-practices
Aug 23, 2026
Merged

matheuseabra merged 1 commit into
mainfrom
codex/rust-practices

Conversation

@matheuseabra

Copy link
Copy Markdown
Owner

What changed?

  • Remove the redundant SparklineBar clone on every render by moving the owned vector into Ratatui.
  • Avoid cloning the minimum-size title line when rendering narrow panes.
  • Remove the unused Config: Clone implementation.
  • Sharpen unit-test names and coverage for compact formatting, percentages, gradients, and all metric labels/icons.

This applies the installed Rust best-practice guidance without adding abstractions, dependencies, or changing the UI contract.

Validation

  • cargo fmt --all -- --check
  • cargo check --locked
  • cargo test --locked (7 passed)
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::perf
  • No UI surface changed; rendered terminal verification was not needed.

Notes for reviewers

The review also checked error handling, unsafe code, ownership, trait-object use, and documentation applicability. The existing Result/Option handling and small binary architecture were retained because no concrete improvement was supported by the code or lint output.

@matheuseabra
matheuseabra merged commit 81bb8e0 into main Aug 23, 2026
2 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.

1 participant