Skip to content

style: cargo fmt --all sweep under stable rustfmt 1.8.0 - #89

Merged
PhysShell merged 1 commit into
mainfrom
claude/rustfmt-sweep
Jun 20, 2026
Merged

style: cargo fmt --all sweep under stable rustfmt 1.8.0#89
PhysShell merged 1 commit into
mainfrom
claude/rustfmt-sweep

Conversation

@PhysShell

@PhysShell PhysShell commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Pure cargo fmt --all output over pre-existing formatting drift — no logic changes.

Why

Several files had drifted from cargo fmt under the current stable rustfmt (1.8.0, 2026-03-25) — line-wrapping of assert!/method chains, mostly. There is no CI job running cargo fmt --check (or clippy/test) on the core/cli workspace — only the web* (wasm) workflows exist — so the drift merged uncaught. AGENTS.md lists cargo fmt --all as the standard, so this realigns the tree.

Scope

Branched off main, touches only files untouched by the chord-quality feature in #88, so the two PRs are independent:

  • cli/src/main.rs
  • core/src/dump.rs, core/src/novelty.rs, core/src/split.rs
  • core/tests/dump_golden.rs, core/tests/novelty.rs, core/tests/slice_extract.rs, core/tests/technique_tags.rs

Verification

  • cargo fmt --all --check → clean (0 diffs) workspace-wide
  • cargo test --workspace green

Optional follow-up worth considering: a lightweight CI job running cargo fmt --check + clippy -D warnings + cargo test on the core/cli workspace would keep this from recurring.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95


Generated by Claude Code

Summary by CodeRabbit

  • Style
    • Reformatted code across multiple files for improved readability, including multi-line struct literals and expanded assertions in tests. All changes are structural formatting updates with no functional impact.

Pure `cargo fmt --all` output — no logic changes. These files had accrued
formatting drift under the current stable rustfmt (1.8.0, 2026-03-25); no
CI job runs `cargo fmt --check` on the core/cli workspace (only the web
crate is gated), so it went uncaught and merged.

Kept separate from the chord-quality feature in #88; touches only files
that feature does not.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTUbGjzD8ysnVnCJnZJE95
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 322c16a3-2ad9-45e0-8821-3b98dc0c3201

📥 Commits

Reviewing files that changed from the base of the PR and between 1fcf816 and bc645be.

📒 Files selected for processing (8)
  • cli/src/main.rs
  • core/src/dump.rs
  • core/src/novelty.rs
  • core/src/split.rs
  • core/tests/dump_golden.rs
  • core/tests/novelty.rs
  • core/tests/slice_extract.rs
  • core/tests/technique_tags.rs

📝 Walkthrough

Walkthrough

Pure formatting-only PR: struct literals, macro invocations, and assertion blocks across cli/src/main.rs, core/src/dump.rs, core/src/novelty.rs, core/src/split.rs, and several core/tests/ files are reformatted into multi-line forms. No logic, values, control flow, or public APIs were changed.

Changes

Formatting Reformats

Layer / File(s) Summary
Production source reformats
cli/src/main.rs, core/src/dump.rs, core/src/novelty.rs, core/src/split.rs
bar_range tuple assignment, NormVoice struct literal, PhraseDuplicate struct literal, and bar_segments assert_eq call each expanded to multi-line form with identical semantics.
Test and fixture reformats
cli/src/main.rs, core/tests/dump_golden.rs, core/tests/novelty.rs, core/tests/slice_extract.rs, core/tests/technique_tags.rs
Note arrays, voice_of/phrase_chunks/chunks_for_segments calls, FretboardPosition literal, and assert!/assert_eq! blocks in tests reformatted to multi-line; all expected values unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • PhysShell/griff#70: Touches the same phrase_chunks / meta.source.bar_range inclusive [first, last] assignment in cli/src/main.rs.
  • PhysShell/griff#85: Introduces the PhraseDuplicate construction logic inside flag_phrase_duplicates in core/src/novelty.rs that this PR reformats.

Poem

🐇 A rabbit tidied up the code one day,
Broke long lines so they'd no longer stray.
No logic changed, no values bent,
Just whitespace shifted with good intent.
The diff is wide but meaning thin—
A cleaner codebase wins! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: applying rustfmt 1.8.0 formatting across the codebase, which is the core purpose of the entire PR.
Docstring Coverage ✅ Passed Docstring coverage is 88.89% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/rustfmt-sweep

Comment @coderabbitai help to get the list of available commands and usage tips.

@PhysShell
PhysShell merged commit 48b87c9 into main Jun 20, 2026
1 check 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