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

Open
sharan104 wants to merge 1 commit from upstream-pr/241 into main
sharan104 commented 2026-11-26 12:27:26 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by sharan104 on 2026-11-26T12:27:26Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6626633086 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/241). Originally posted by [sharan104](https://github.com/sharan104) on 2026-11-26T12:27:26Z. --- 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)
lerapeurdu62280-debug commented 2026-11-26 14:16:02 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by lerapeurdu62280-debug on 2026-11-26T14:16:02Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:review:6075635684 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/241#pullrequestreview-6075635684). Originally posted by [lerapeurdu62280-debug](https://github.com/lerapeurdu62280-debug) on 2026-11-26T14:16:02Z. --- 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 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/241:upstream-pr/241'
git switch 'upstream-pr/241'

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/241'
git switch 'upstream-pr/241'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/241'
git switch 'upstream-pr/241'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/241'
git switch 'main'
git merge --squash 'upstream-pr/241'
git switch 'main'
git merge --ff-only 'upstream-pr/241'
git switch 'main'
git merge 'upstream-pr/241'
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
avatarmanz/VIctory-7900XTX!241
No description provided.