Clippy: fix main's five errors (font.rs, menu.rs, panel.rs) so PR checks pass again #4707

Open
kc01-8 wants to merge 1 commit from upstream-pr/4707 into main
kc01-8 commented 2026-12-01 02:38:57 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kc01-8 on 2026-12-01T02:38:57Z.


main fails its own Clippy step since #4634 (f5c3d2434), so every open PR's check is red:

  • host/font.rs:213 and :260: text and text_right take 9 arguments. Allowed with #[allow(clippy::too_many_arguments)], as elsewhere in the crate.
  • host/menu.rs:667: the key repeat's % REPEAT_EVERY == 0 becomes .is_multiple_of(REPEAT_EVERY).
  • host/panel.rs:602 and :668: two nested ifs are collapsed into let chains.

Nothing changes in behavior. Here, both of the CI's Clippy steps (--workspace --all-targets, with and without --all-features, -D warnings) report 0 errors, and cargo test --workspace under Proton's Wine fails the same tests as main does.

From the Linux/Proton fork: https://github.com/kc01-8/VIctoryNVIDIALINUX (branch kc/trustno1).

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5577834081 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4707). Originally posted by [kc01-8](https://github.com/kc01-8) on 2026-12-01T02:38:57Z. --- `main` fails its own Clippy step since #4634 (f5c3d2434), so every open PR's `check` is red: - `host/font.rs:213` and `:260`: `text` and `text_right` take 9 arguments. Allowed with `#[allow(clippy::too_many_arguments)]`, as elsewhere in the crate. - `host/menu.rs:667`: the key repeat's `% REPEAT_EVERY == 0` becomes `.is_multiple_of(REPEAT_EVERY)`. - `host/panel.rs:602` and `:668`: two nested `if`s are collapsed into let chains. Nothing changes in behavior. Here, both of the CI's Clippy steps (`--workspace --all-targets`, with and without `--all-features`, `-D warnings`) report 0 errors, and `cargo test --workspace` under Proton's Wine fails the same tests as `main` does. From the Linux/Proton fork: https://github.com/kc01-8/VIctoryNVIDIALINUX (branch `kc/trustno1`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
andrewpozdnakov7-jpg commented 2026-12-01 06:57:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T06:57:39Z.


I checked this fix on current upstream main 5fabb46 with native Windows Rust 1.98.1 and locked dependencies.

  • Clean main reproduced all five Clippy findings from the Windows CI job.
  • Cherry-picking f4396b7 onto that base passed both strict workspace Clippy commands. That includes --all-targets with and without --all-features.
  • Applying the exact current changes from #3833 (7fa2234) and #4018 (86084fd) on top still passed both commands. The two existing PR checks stop at the same five findings on their current base.

This verifies the fix against the current base and the two PRs blocked on it. The Windows check on this PR also passed both Clippy steps and Tests.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7303481996 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4707#issuecomment-7303481996). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T06:57:39Z. --- I checked this fix on current upstream main `5fabb46` with native Windows Rust 1.98.1 and locked dependencies. - Clean main reproduced all five Clippy findings from the Windows CI job. - Cherry-picking `f4396b7` onto that base passed both strict workspace Clippy commands. That includes `--all-targets` with and without `--all-features`. - Applying the exact current changes from #3833 (`7fa2234`) and #4018 (`86084fd`) on top still passed both commands. The two existing PR checks stop at the same five findings on their current base. This verifies the fix against the current base and the two PRs blocked on it. The [Windows check on this PR](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46562670350/job/142353819286) also passed both Clippy steps and Tests.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/4707:upstream-pr/4707'
git switch 'upstream-pr/4707'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/4707'
git switch 'upstream-pr/4707'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/4707'
git switch 'upstream-pr/4707'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/4707'
git switch 'main'
git merge --squash 'upstream-pr/4707'
git switch 'main'
git merge --ff-only 'upstream-pr/4707'
git switch 'main'
git merge 'upstream-pr/4707'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!4707
No description provided.