watch.rs: pass the guards to open() by shared reference (main's Clippy step fails on it) #241

Open
github-bot wants to merge 1 commit from github-bot/gh-241 into main AGit
Owner

@⁠sharan104 on GitHub · 2026-11-26 12:27 UTC · original
sharan104:fix/clippy-main-watch → main · +1 −1 · 1 files · 1 commits · open

CI on main (a9400a6) fails Clippy with -D warnings in victory-gpu:

error: the method `open` doesn't need a mutable reference  (clippy::unnecessary_mut_passed)
  --> crates/victory-gpu/src/watch.rs:3205

open() takes &Guards, and title_memory_remapped passed the write guard as &mut. Now it passes &. The write lock is still taken and held for the call, as before. Only the borrow handed to open() changes.

With this, cargo clippy --workspace --all-targets --locked -- -D warnings (with and without --all-features, run with --keep-going so later crates are linted too) is left with one failure: the two transmute annotations in victory-loader/src/descriptor_sites.rs:277. #169 already fixes those, so this PR leaves them alone. With both merged, the Clippy steps pass.

🤖 Generated with Claude Code

**@⁠sharan104** on GitHub · 2026-11-26 12:27 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/241) `sharan104:fix/clippy-main-watch` → `main` · +1 −1 · 1 files · 1 commits · open CI on `main` (a9400a6) fails Clippy with `-D warnings` in `victory-gpu`: ``` error: the method `open` doesn't need a mutable reference (clippy::unnecessary_mut_passed) --> crates/victory-gpu/src/watch.rs:3205 ``` `open()` takes `&Guards`, and `title_memory_remapped` passed the write guard as `&mut`. Now it passes `&`. The write lock is still taken and held for the call, as before. Only the borrow handed to `open()` changes. With this, `cargo clippy --workspace --all-targets --locked -- -D warnings` (with and without `--all-features`, run with `--keep-going` so later crates are linted too) is left with one failure: the two `transmute` annotations in `victory-loader/src/descriptor_sites.rs:277`. #169 already fixes those, so this PR leaves them alone. With both merged, the Clippy steps pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
open() takes &Guards; the write guard was passed as &mut, which Clippy's
unnecessary_mut_passed refuses under -D warnings, so CI on main fails in
victory-gpu (both feature sets). The write lock is held for the call as
before: only the borrow handed to open() changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 12:30:57 +00:00
Author
Owner

@⁠lerapeurdu62280-debug on GitHub · 2026-11-26 14:16 UTC · original · approved these changes

Trivial and correct: open() only needs a shared reference, and this clears main's clippy::unnecessary_mut_passed. Should go in with #169.

**@⁠lerapeurdu62280-debug** on GitHub · 2026-11-26 14:16 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/241#pullrequestreview-6075635684) · **approved these changes** Trivial and correct: open() only needs a shared reference, and this clears main's clippy::unnecessary_mut_passed. Should go in with #169.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/241/head:github-bot/gh-241'
git switch 'github-bot/gh-241'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-241'
git switch 'github-bot/gh-241'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-241'
git switch 'github-bot/gh-241'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-241'
git switch 'main'
git merge --squash 'github-bot/gh-241'
git switch 'main'
git merge --ff-only 'github-bot/gh-241'
git switch 'main'
git merge 'github-bot/gh-241'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.