Skip to content

Fix clippy lints for Rust 1.97#2641

Merged
fnando merged 4 commits into
mainfrom
rust-1.97
Jul 10, 2026
Merged

Fix clippy lints for Rust 1.97#2641
fnando merged 4 commits into
mainfrom
rust-1.97

Conversation

@fnando

@fnando fnando commented Jul 10, 2026

Copy link
Copy Markdown
Member

What

Fixes new clippy lint failures introduced by the Rust 1.97 upgrade so make check passes again. Removes redundant references in format arguments, drops a .to_string() call on a Display type, and inlines a format argument across 7 files.

Why

Rust 1.97 promotes several clippy lints (useless_borrows_in_formatting, to_string_in_format_args, uninlined_format_args) that broke the build under -D clippy::all. These are mechanical, no-behavior-change fixes to keep the lint gate green.

Known limitations

N/A

Copilot AI review requested due to automatic review settings July 10, 2026 14:45
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jul 10, 2026
@fnando
fnando requested a review from mootz12 July 10, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates several Rust CLI and test/support crates to satisfy newly promoted Clippy lints under Rust 1.97 (notably around redundant borrows in formatting, to_string() in format args, and uninlined format args), keeping make check green without intended behavior changes.

Changes:

  • Removes redundant references (&...) in format arguments across multiple crates.
  • Drops an unnecessary .to_string() in a formatting context for identity overwrite messaging.
  • Uses Rust’s inline format argument syntax in a println! call.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cmd/soroban-cli/src/commands/tx/fetch/result.rs Inlines a println! format arg to satisfy uninlined_format_args.
cmd/soroban-cli/src/commands/keys/generate.rs Removes redundant borrow and .to_string() in overwrite identity message formatting.
cmd/soroban-cli/src/commands/keys/add.rs Same formatting cleanup for overwrite identity message.
cmd/soroban-cli/src/commands/container/start.rs Removes redundant borrow in a formatted “Starting network” info message.
cmd/crates/soroban-test/tests/it/build.rs Removes redundant borrow in cargo_home.display() formatting used for path prefixing.
cmd/crates/soroban-test/src/lib.rs Removes redundant borrows when formatting RPC header key/value into an env var string.
cmd/crates/soroban-spec-tools/src/contract.rs Removes redundant borrow in a writeln! formatting argument for docs output.

@fnando
fnando enabled auto-merge (squash) July 10, 2026 16:31
@fnando
fnando requested a review from Ryang-21 July 10, 2026 16:31
@fnando fnando self-assigned this Jul 10, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Jul 10, 2026
@fnando
fnando merged commit 68331f1 into main Jul 10, 2026
227 checks passed
@fnando
fnando deleted the rust-1.97 branch July 10, 2026 17:08
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants