chore(fmt): apply rustfmt + strip trailing whitespace across the tree#49
Merged
Conversation
`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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo fmt --all -- --checkis currently failing onmain(you can see it in any open PR'sRust CI / Check). Two root causes:src/actors/monitor/monitor_actor.rsandsrc/actors/monitor/txn_tracker.rs. rustfmt refuses to format files that contain trailing whitespace, surfacing it aserror[internal]: left behind trailing whitespace.Both effects mean every new PR inherits a CI failure that has nothing to do with the PR itself.
What this PR does
.rsundersrc/:cargo fmt --all.After:
cargo fmt --all -- --checkexits 0;cargo checkpasses; 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 -- --checkexits 0cargo checkexits 0🤖 Generated with Claude Code