[PR #1795] [MERGED] fix(rust): remove unused assignments in tv_screen.rs #2532

Open
opened 2026-01-29 17:22:38 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1795
Author: @cfsmp3
Created: 12/12/2025
Status: Merged
Merged: 12/12/2025
Merged by: @cfsmp3

Base: masterHead: fix/rust-clippy-warnings


📝 Commits (1)

  • 55cb731 fix(rust): remove unused assignments in tv_screen.rs

📊 Changes

1 file changed (+0 additions, -3 deletions)

View changed files

📝 src/rust/src/decoder/tv_screen.rs (+0 -3)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1795 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 12/12/2025 **Status:** ✅ Merged **Merged:** 12/12/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/rust-clippy-warnings` --- ### 📝 Commits (1) - [`55cb731`](https://github.com/CCExtractor/ccextractor/commit/55cb731f5defdc4ebcccf5be90090a85f21f9a27) fix(rust): remove unused assignments in tv_screen.rs ### 📊 Changes **1 file changed** (+0 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/rust/src/decoder/tv_screen.rs` (+0 -3) </details> ### 📄 Description ## 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 - [x] Code compiles without errors - [x] Clippy warnings for tv_screen.rs are resolved - [ ] Existing tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:22:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2532