Skip to content

chore(fmt): apply rustfmt + strip trailing whitespace across the tree#49

Merged
keanji-x merged 1 commit into
mainfrom
chore/rustfmt-tree
Apr 27, 2026
Merged

chore(fmt): apply rustfmt + strip trailing whitespace across the tree#49
keanji-x merged 1 commit into
mainfrom
chore/rustfmt-tree

Conversation

@keanji-x

Copy link
Copy Markdown
Collaborator

Summary

cargo fmt --all -- --check is currently failing on main (you can see it in any open PR's Rust CI / Check). Two root causes:

  1. Trailing whitespace in src/actors/monitor/monitor_actor.rs and src/actors/monitor/txn_tracker.rs. rustfmt refuses to format files that contain trailing whitespace, surfacing it as error[internal]: left behind trailing whitespace.
  2. Drift — several files have drifted away from rustfmt's current output.

Both effects mean every new PR inherits a CI failure that has nothing to do with the PR itself.

What this PR does

  1. Strip trailing whitespace from every .rs under src/:
    find src -name '*.rs' -exec sed -i 's/[[:space:]]*$//' {} +
    
  2. Run cargo fmt --all.

After: cargo fmt --all -- --check exits 0; cargo check passes; no logic changes.

Why merge this first

PRs #47 and #48 are both blocked on the same CI failure. Merging this unblocks them (after rebase) without scope creep — neither of those PRs should be carrying unrelated formatting noise.

Test plan

  • cargo fmt --all -- --check exits 0
  • cargo check exits 0
  • No behavioral changes — diff is whitespace + line wrapping only

🤖 Generated with Claude Code

`cargo fmt --all -- --check` was failing on main because:
* `src/actors/monitor/monitor_actor.rs` and
  `src/actors/monitor/txn_tracker.rs` had trailing whitespace
  (rustfmt declines to format files containing trailing whitespace,
  surfacing it as `error[internal]: left behind trailing whitespace`).
* Several files had drifted away from rustfmt's current output.

This commit:
1. Strips trailing whitespace from every `.rs` under `src/`
   (`find src -name '*.rs' -exec sed -i 's/[[:space:]]*\$//' {} +`).
2. Runs `cargo fmt --all` so the tree matches rustfmt.toml.

No logic changes. After this commit `cargo fmt --all -- --check`
exits 0 and the Rust CI / Check job passes. This unblocks PRs that
otherwise inherit the pre-existing CI failure on main.
@keanji-x keanji-x merged commit 8736cf7 into main Apr 27, 2026
1 of 2 checks passed
@keanji-x keanji-x deleted the chore/rustfmt-tree branch April 27, 2026 14:33
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