style: fix rustfmt and clippy warnings#75
Merged
Merged
Conversation
The codebase carried latent rustfmt diffs and clippy lints (get_first, needless_return, let_and_return, vec_init_then_push, redundant clones and borrows, unnecessary Some/unwrap) that the existing CI never gated on. Resolve them so the stricter `cargo fmt --check` and `cargo clippy -D warnings` gates introduced by the release-process migration pass. No behavioural change. Assisted-by: Claude Code:claude-opus-4-8[1m]
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.
What
Resolve latent
rustfmtandclippyissues across the existing codebase. No behavioural change — every edit is a mechanical lint fix.Err(format!(...))/format!calls and re-indented blocks insrc/cli/extension.rs.-D warnings):clippy::get_first—args.get(0)→args.first()(otel.rs)clippy::needless_return— dropped trailingreturn(pact_broker_ruby.rs)clippy::let_and_return— return the builder directly (cli.rs)clippy::vec_init_then_push—vec![…]literal (pact_broker_docker.rs)Some(…).unwrap()(cli.rs,bin.rs)Why
The PR-based release migration (#74) adds
cargo fmt --checkandcargo clippy -- -D warningsgates that the previous CI never ran, so these pre-existing issues were invisible. Landing them here keeps #74 focused purely on the release tooling; #74 will be rebased on top once this merges.Verification
cargo fmt --check— cleancargo clippy --tests --bins -- -D warnings— clean (exit 0)cargo nextest run— 1 passed