chore: cargo fmt --all#13
Conversation
Mechanical reformat. The recent wireless-stack PR introduced a few spots that didn't match rustfmt defaults — running `cargo fmt --all` makes the lint job (informational) fmt check stop reporting diffs. No behavior change. Once this lands, the `continue-on-error: true` on the fmt step in CI can be flipped to false in a follow-up.
There was a problem hiding this comment.
Pull request overview
Mechanical formatting cleanup to make the Rust codebase rustfmt-clean, aligning with the CI lint job’s cargo fmt --check step added recently.
Changes:
- Reformat
LogType::Error(...)calls in the Wireless Stack UI tab to matchrustfmtoutput. - Reformat the OpenOCD
cmd.args(&[...])argument list into a single-line array perrustfmt.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ui/tab_wireless_stack.rs | rustfmt-style formatting of a few LogType::Error(...) call sites. |
| src/open_ocd_task.rs | rustfmt-style formatting of the cmd.args(&[...]) slice passed to OpenOCD. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "-s", | ||
| &ws_foler, | ||
| ]); | ||
| cmd.args(&["-s", &config_folder, "-s", &tmp_folder, "-s", &ws_foler]); |
There was a problem hiding this comment.
ws_foler appears to be a misspelling of ws_folder, which makes the intent less clear. Consider renaming the local variable (and updating the associated map_err message near its definition, which currently says "config path" even though this is the wireless stack path).
There was a problem hiding this comment.
Fixed in de882e2 — ws_foler → ws_folder and the map_err now says "Failed to convert wireless stack path to string" instead of "config path". Slightly out of scope for the fmt PR but trivial enough not to deserve its own.
Local variable typo and a copy-pasted map_err that said "config path" for the wireless stack folder. Per Copilot review on PR #13.
Summary
Mechanical reformat to make the codebase fmt-clean.
The recent wireless-stack PR (#5) introduced a few spots that didn't match
rustfmtdefaults. With #12 having addedcargo fmt --checkto the lint job (currently informational,continue-on-error: true), this PR clears its output.Diff is tiny — only 2 files actually had drift, total of ~17 lines.
Follow-up (separate PR)
Once this lands, flip
continue-on-error: truetofalseon the fmt step in .github/workflows/ci.yaml so future drift becomes a blocking failure rather than just a warning.Test plan
cargo build --release --lockedstill passes (matrix + main).cargo fmt --all -- --checkreturns 0 (verify in the lint job log).