Skip to content

rust: run cargo fmt --all over the workspace; require it before commits - #126

Merged
ling0322 merged 1 commit into
mainfrom
worktree-cargo-fmt
Oct 15, 2026
Merged

ling0322 merged 1 commit into
mainfrom
worktree-cargo-fmt

Conversation

@ling0322

Copy link
Copy Markdown
Owner

Formats every crate in the workspace (waifu, waifu-cli, waifu-modelmanager, waifu-tools) with cargo fmt --all in the default rustfmt style, and adds a Formatting section to CLAUDE.md requiring cargo fmt --all before any Rust commit. No behaviour changes: 73 Rust files are reformatted, plus CLAUDE.md.

Why

Nothing ran rustfmt — not CI, not a hook, not CLAUDE.md — so formatting had drifted across most of the tree. Landing this as a format-only PR keeps the churn out of feature diffs.

Tests

  • ./build/unittest: 9594 assertions passed
  • cargo test --manifest-path waifu/Cargo.toml: 392 passed, 111 ignored
  • cargo test -p waifu-modelmanager: 61 passed, 1 ignored
  • cargo build -p waifu-tools: builds
  • cargo test -p waifu-cli: 173 passed, 1 failed — tui::models::tests::the_list_is_the_tasks_own (anima:miaomiao appears in the Img2Img list). It fails the same way on unformatted main at fec7836, so it is pre-existing and not touched here.
  • Model tests skipped.

Not included

CI does not check formatting yet; a cargo fmt --all --check step in ci.yml would keep the tree from drifting again.

🤖 Generated with Claude Code

Format every crate in the workspace (waifu, waifu-cli, waifu-modelmanager,
waifu-tools) with the default rustfmt style, and add a Formatting section to
CLAUDE.md asking for `cargo fmt --all` before committing any Rust change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ling0322
ling0322 merged commit 755f920 into main Oct 15, 2026
0 of 3 checks passed
ling0322 added a commit that referenced this pull request Oct 15, 2026
Brings in #125 (anima: adapter.rs and dit.rs from diffusers) and #126
(cargo fmt --all over the workspace). The four conflicts --
waifu/src/flint/{functional,mod}.rs and waifu/tests/audio{,_cuda}.rs -- were
formatting only on main's side: each is the merge base run through rustfmt.
They take this branch's content, and the workspace is then run through
cargo fmt --all as CLAUDE.md now asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WkfaWVmr9m5uxoJ4grPuLm
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.

1 participant