Skip to content

fix(rust): remove unused assignments in tv_screen.rs#1795

Merged
cfsmp3 merged 1 commit intomasterfrom
fix/rust-clippy-warnings
Dec 12, 2025
Merged

fix(rust): remove unused assignments in tv_screen.rs#1795
cfsmp3 merged 1 commit intomasterfrom
fix/rust-clippy-warnings

Conversation

@cfsmp3
Copy link
Copy Markdown
Contributor

@cfsmp3 cfsmp3 commented Dec 12, 2025

Summary

Remove three unused assignments to time_show.time_in_ms in src/rust/src/decoder/tv_screen.rs that were flagged by Clippy as "value assigned is never read".

Issue

Clippy reported warnings:

warning: value assigned to `time_show` is never read
   --> src/decoder/tv_screen.rs:457:17
warning: value assigned to `time_show` is never read
   --> src/decoder/tv_screen.rs:469:17
warning: value assigned to `time_show` is never read
   --> src/decoder/tv_screen.rs:476:17

Root Cause

The code pattern was:

  1. Subtract frame delay from time_show.time_in_ms
  2. Use the modified value in get_scc_time_str(time_show)
  3. Add frame delay back (restore original value)

However, since time_show is not used after the match statement ends, the restoration assignments (step 3) were unnecessary dead code.

Changes

Removed the three unnecessary += 1000 / 29.97 as i64 assignments at the end of each match branch.

Test plan

  • Code compiles without errors
  • Clippy warnings for tv_screen.rs are resolved
  • Existing tests pass

🤖 Generated with Claude Code

Remove three unused assignments to `time_show.time_in_ms` that were
flagged by Clippy as "value assigned is never read".

The pattern was: subtract frame delay, use the value, then restore it.
However, since `time_show` is not used after the match statement, the
restoration assignments were unnecessary dead code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cfsmp3 cfsmp3 merged commit e8383c8 into master Dec 12, 2025
29 of 31 checks passed
@cfsmp3 cfsmp3 deleted the fix/rust-clippy-warnings branch December 19, 2025 06:05
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