Skip to content

chore: cargo fmt --all#13

Merged
nedseb merged 2 commits into
mainfrom
chore/cargo-fmt-cleanup
Apr 28, 2026
Merged

chore: cargo fmt --all#13
nedseb merged 2 commits into
mainfrom
chore/cargo-fmt-cleanup

Conversation

@nedseb
Copy link
Copy Markdown
Contributor

@nedseb nedseb commented Apr 28, 2026

Summary

Mechanical reformat to make the codebase fmt-clean.

The recent wireless-stack PR (#5) introduced a few spots that didn't match rustfmt defaults. With #12 having added cargo fmt --check to 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: true to false on 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 --locked still passes (matrix + main).
  • cargo fmt --all -- --check returns 0 (verify in the lint job log).

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.
Copilot AI review requested due to automatic review settings April 28, 2026 10:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 match rustfmt output.
  • Reformat the OpenOCD cmd.args(&[...]) argument list into a single-line array per rustfmt.

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.

Comment thread src/open_ocd_task.rs Outdated
"-s",
&ws_foler,
]);
cmd.args(&["-s", &config_folder, "-s", &tmp_folder, "-s", &ws_foler]);
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in de882e2ws_folerws_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.
@nedseb nedseb merged commit d42dbbf into main Apr 28, 2026
3 checks passed
@nedseb nedseb deleted the chore/cargo-fmt-cleanup branch April 28, 2026 10:40
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