fmt: Format all files #502

Closed
LazyHatGuy wants to merge 2 commits from upstream-pr/502 into main
LazyHatGuy commented 2026-11-24 04:14:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LazyHatGuy on 2026-11-24T04:14:50Z.


In order for the lint job to pass in #481, the current files need to be formatted

<!-- greyfinch-sync:Marvisak/VIctory:issue:6574470072 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/502). Originally posted by [LazyHatGuy](https://github.com/LazyHatGuy) on 2026-11-24T04:14:50Z. --- In order for the lint job to pass in #481, the current files need to be formatted
sebastianspicker commented 2026-11-24 13:01:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by sebastianspicker on 2026-11-24T13:00:39Z.

Review: CHANGES_REQUESTED


Tested c2609ea against main ffe310e (macOS, Rust 1.98.1, Windows-target clippy via cargo-xwin).

  • The branch is exactly what cargo fmt --all with the pinned rustfmt produces on ffe310e: byte-identical tree, nothing else changed. So if main moves, it can be regenerated instead of rebased.
  • Windows clippy (--workspace --all-targets -- -D warnings, as ci.yml runs it) fails with two undocumented_unsafe_blocks errors, at victory-gpu/src/list.rs:1464 and victory-gpu/src/watch.rs:369. Formatting splits two test asserts so the // SAFETY: comment ends up above assert!( and no longer above the unsafe block. Binding the value first fixes both, and then clippy passes with and without --all-features:
// SAFETY: the list is ours.
let uploads = unsafe { &(*list.cast::<List>()).uploads };
assert!(uploads.lock().unwrap().is_empty());
// SAFETY: the bytes just read.
let bytes = unsafe { std::slice::from_raw_parts((view + 100) as *const u8, 13) };
assert_eq!(bytes, b"from the disk");
  • Optional: about half the diff is xma/tables.rs going from 8 entries per row to one per line (410 to 874 lines). #[rustfmt::skip] on its 16 table consts keeps the current layout, cargo fmt --all -- --check still passes, and the PR shrinks from +1680/-631 to +870/-276.

On conflicts: I took a random sample of 40 open PRs that touch one of these 35 files. 4 of them (#96, #431, #624, #633) merge cleanly with main today and conflict after this PR; 13 already conflict with main; 23 merge cleanly either way.

#112 has a format pass too (c05812d). It still has the same two detached comments and is 160 commits behind main, so only one of the two should land.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:review:6039629377 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/502#pullrequestreview-6039629377). Originally posted by [sebastianspicker](https://github.com/sebastianspicker) on 2026-11-24T13:00:39Z. **Review:** CHANGES_REQUESTED --- Tested `c2609ea` against `main` `ffe310e` (macOS, Rust 1.98.1, Windows-target clippy via cargo-xwin). - The branch is exactly what `cargo fmt --all` with the pinned rustfmt produces on `ffe310e`: byte-identical tree, nothing else changed. So if `main` moves, it can be regenerated instead of rebased. - Windows clippy (`--workspace --all-targets -- -D warnings`, as `ci.yml` runs it) fails with two `undocumented_unsafe_blocks` errors, at `victory-gpu/src/list.rs:1464` and `victory-gpu/src/watch.rs:369`. Formatting splits two test asserts so the `// SAFETY:` comment ends up above `assert!(` and no longer above the `unsafe` block. Binding the value first fixes both, and then clippy passes with and without `--all-features`: ```rust // SAFETY: the list is ours. let uploads = unsafe { &(*list.cast::<List>()).uploads }; assert!(uploads.lock().unwrap().is_empty()); ``` ```rust // SAFETY: the bytes just read. let bytes = unsafe { std::slice::from_raw_parts((view + 100) as *const u8, 13) }; assert_eq!(bytes, b"from the disk"); ``` - Optional: about half the diff is `xma/tables.rs` going from 8 entries per row to one per line (410 to 874 lines). `#[rustfmt::skip]` on its 16 table consts keeps the current layout, `cargo fmt --all -- --check` still passes, and the PR shrinks from +1680/-631 to +870/-276. On conflicts: I took a random sample of 40 open PRs that touch one of these 35 files. 4 of them (#96, #431, #624, #633) merge cleanly with `main` today and conflict after this PR; 13 already conflict with `main`; 23 merge cleanly either way. #112 has a format pass too (`c05812d`). It still has the same two detached comments and is 160 commits behind `main`, so only one of the two should land. AI-assisted.
upstream-sync closed this pull request 2026-11-25 00:05:32 +00:00
Marvisak commented 2026-11-25 00:06:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:03:28Z.


Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current).

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148090127 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/502#issuecomment-7148090127). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:03:28Z. --- Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current). If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
LazyHatGuy commented 2026-11-25 00:06:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LazyHatGuy on 2026-11-25T00:06:19Z.


Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current).

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

In order for https://github.com/Marvisak/VIctory/pull/481 to pass, the files in the project need to be formatted. In my opinion this should be something enforced

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148143059 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/502#issuecomment-7148143059). Originally posted by [LazyHatGuy](https://github.com/LazyHatGuy) on 2026-11-25T00:06:19Z. --- > Automated triage for the maintainers. Closing because it does not change behaviour the project needs (formatting, guards for cases that cannot occur, or notes and translations that cannot be kept current). > > If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. In order for https://github.com/Marvisak/VIctory/pull/481 to pass, the files in the project need to be formatted. In my opinion this should be something enforced

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!502
No description provided.