Skip to content

style(shader-driver): drop double-space alignment in bindspace.rs comments#327

Merged
AdaWorldAPI merged 1 commit into
mainfrom
cursor/fmt-shader-driver-bindspace-fe75
May 1, 2026
Merged

style(shader-driver): drop double-space alignment in bindspace.rs comments#327
AdaWorldAPI merged 1 commit into
mainfrom
cursor/fmt-shader-driver-bindspace-fe75

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

Summary

Surfaced during the post-merge code-review pass over PRs #322#325. PR #323 introduced two trailing-comment alignments using two leading spaces (PR_N // comment) instead of the surrounding file's single-space convention. rustfmt 1.94.1 collapses both back to a single space, so the file is one CI rustfmt invocation away from failing — the only thing keeping it green today is that cognitive-shader-driver isn't yet under any cargo fmt CI gate.

Diff

-pub const FLOATS_PER_VSA: usize = 16_384;  // Vsa16kF32 carrier width
+pub const FLOATS_PER_VSA: usize = 16_384; // Vsa16kF32 carrier width
-    pub cycle: Box<[f32]>,    // was Box<[u64]>, now Vsa16kF32 carrier (16_384 f32 per row)
+    pub cycle: Box<[f32]>, // was Box<[u64]>, now Vsa16kF32 carrier (16_384 f32 per row)

Two lines, no behaviour change.

Why surgical, not rustfmt --write over the whole file

rustfmt --check against this file currently flags more than the two PR #323 lines: the file's pre-existing one-line accessors

pub fn zeros(len: usize) -> Self { Self(vec![0u64; len].into_boxed_slice()) }
#[inline] pub fn get(&self, row: usize) -> u64 { self.0[row] }

would also be expanded across multiple lines. That's the maintainers' chosen aesthetic for the rest of the file (and the same style is used elsewhere in the crate); changing it is a taste decision, not a drift-fix. Keeping this PR to only the alignment drift PR #323 introduced lets the larger style question — including whether to put cognitive-shader-driver under a CI fmt gate at all — happen in its own decision window.

Verification

  • cargo test --manifest-path crates/cognitive-shader-driver/Cargo.toml --lib bindspace12/12 pass.

Companion PR

PR #326 (open) — fixes PR #322's log_norm_growth_negative_when_m_attenuates test that was broken at merge.

Open in Web Open in Cursor 

…ments

PR #323 introduced two trailing-comment alignments using two leading
spaces ('PR_N  // comment') instead of the surrounding file's
single-space convention. rustfmt 1.94.1 collapses both back to a
single space, so the file is one CI rustfmt invocation away from
failing — the only thing keeping it green today is that
cognitive-shader-driver isn't yet under any cargo fmt CI gate.

Two surgical edits, no behaviour change:

  -pub const FLOATS_PER_VSA: usize = 16_384;  // Vsa16kF32 carrier width
  +pub const FLOATS_PER_VSA: usize = 16_384; // Vsa16kF32 carrier width

  -    pub cycle: Box<[f32]>,    // was Box<[u64]>, now Vsa16kF32 carrier (16_384 f32 per row)
  +    pub cycle: Box<[f32]>, // was Box<[u64]>, now Vsa16kF32 carrier (16_384 f32 per row)

Surfaced during the post-merge code-review pass over PRs #322-#325.
The file's other (pre-existing) one-line accessor styles are left
untouched on purpose — those are the maintainers' chosen aesthetic
and rustfmt would also expand them, so a full 'rustfmt --check' fix
would mix scopes (taste-change vs drift-fix). Keeping this commit
to drift-fix only.

Co-authored-by: AdaWorldAPI <AdaWorldAPI@users.noreply.github.com>
@AdaWorldAPI AdaWorldAPI marked this pull request as ready for review May 1, 2026 12:53
@AdaWorldAPI AdaWorldAPI merged commit 934c262 into main May 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants