Fix clippy field_reassign_with_default in xmem #405

Closed
Marrqquess wants to merge 1 commit from upstream-pr/405 into main
Marrqquess commented 2026-11-24 02:58:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marrqquess on 2026-11-24T02:58:14Z.


Initializes PERFORMANCE_INFORMATION with struct update syntax to silence clippy::field_reassign_with_default. No behavior change; cargo test --workspace passes.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6573600125 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/405). Originally posted by [Marrqquess](https://github.com/Marrqquess) on 2026-11-24T02:58:14Z. --- Initializes PERFORMANCE_INFORMATION with struct update syntax to silence clippy::field_reassign_with_default. No behavior change; cargo test --workspace passes.
mercuryVM commented 2026-11-24 06:52:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T05:29:30Z.

Review: APPROVED


Tested 49f113b on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (264 passed, 0 failed).

The struct-update form gives the same value as default() followed by setting cb, and info still has to be mut for K32GetPerformanceInfo(&mut info, …). There is no behaviour change, and it removes the field_reassign_with_default warning that other PRs (for example #449, #480) mention allowing by hand.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6034171959 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/405#pullrequestreview-6034171959). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T05:29:30Z. **Review:** APPROVED --- Tested 49f113b on Windows 11, RTX 5070, MSVC: `cargo test --workspace --no-fail-fast` passes (264 passed, 0 failed). The struct-update form gives the same value as `default()` followed by setting `cb`, and `info` still has to be `mut` for `K32GetPerformanceInfo(&mut info, …)`. There is no behaviour change, and it removes the `field_reassign_with_default` warning that other PRs (for example #449, #480) mention allowing by hand. AI-assisted (Claude Code).
jeremygold02 commented 2026-11-24 06:55:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:34:08Z.


Thanks @Marrqquess for the xmem lint cleanup. I tested head 49f113baf8b1aacb84c171922def2f1c7c1a9d17 with:

cargo test --locked -p victory-hle --lib xmem:: -- --test-threads=1
cargo clippy --locked -p victory-hle --lib -- -D warnings

Result: 9 xmem tests passed, 0 failed; Clippy passed with warnings denied. The tests cover allocator alignment/freeing, virtual allocation constraints, physical-page mapping, and page-run behavior. The change itself is a Clippy-driven initializer cleanup, so the module tests are package regression checks rather than a new behavior-specific test.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7122137991 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/405#issuecomment-7122137991). Originally posted by [jeremygold02](https://github.com/jeremygold02) on 2026-11-24T04:34:08Z. --- Thanks @Marrqquess for the xmem lint cleanup. I tested head `49f113baf8b1aacb84c171922def2f1c7c1a9d17` with: ``` cargo test --locked -p victory-hle --lib xmem:: -- --test-threads=1 cargo clippy --locked -p victory-hle --lib -- -D warnings ``` Result: 9 xmem tests passed, 0 failed; Clippy passed with warnings denied. The tests cover allocator alignment/freeing, virtual allocation constraints, physical-page mapping, and page-run behavior. The change itself is a Clippy-driven initializer cleanup, so the module tests are package regression checks rather than a new behavior-specific test.
Exorion1er commented 2026-11-24 10:03:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Exorion1er on 2026-11-24T09:33:16Z.


This exact change (PERFORMANCE_INFORMATION as a struct literal with ..Default::default() in xmem.rs) is already on main, from commit 40c127c in #355. Merging this PR changes nothing now, so it can be closed.

Checked with git merge-tree against main. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127573534 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/405#issuecomment-7127573534). Originally posted by [Exorion1er](https://github.com/Exorion1er) on 2026-11-24T09:33:16Z. --- This exact change (`PERFORMANCE_INFORMATION` as a struct literal with `..Default::default()` in `xmem.rs`) is already on `main`, from commit `40c127c` in #355. Merging this PR changes nothing now, so it can be closed. Checked with `git merge-tree` against `main`. AI-assisted (Claude Code).
upstream-sync closed this pull request 2026-11-24 13:01:15 +00:00
Marrqquess commented 2026-11-24 13:02:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marrqquess on 2026-11-24T12:47:38Z.


Thanks for checking! You're right, this is already on main via 40c127c (Marvisak/VIctory#355). Closing as duplicate.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7131926627 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/405#issuecomment-7131926627). Originally posted by [Marrqquess](https://github.com/Marrqquess) on 2026-11-24T12:47:38Z. --- Thanks for checking! You're right, this is already on main via 40c127c ([Marvisak/VIctory#355](https://github.com/Marvisak/VIctory/pull/355)). Closing as duplicate.

Pull request closed

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
Marvisak/VIctory!405
No description provided.