Skip to content

fix: satisfy latest-stable clippy in local/mod.rs - #1042

Open
sdairs wants to merge 1 commit into
claude/drift-delta-cli-1038from
fix/clippy-needless-borrow-project-state-error
Open

sdairs wants to merge 1 commit into
claude/drift-delta-cli-1038from
fix/clippy-needless-borrow-project-state-error

Conversation

@sdairs

@sdairs sdairs commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Closes #1041

On the latest stable toolchain, clippy flags needless_borrows_for_generic_args on the three .map_err(&project_state_error) calls in crates/clickhousectl/src/local/mod.rs. That breaks the "Test clickhousectl" Clippy step on main and on every open PR. project_state_error is a closure that captures nothing, so it is Copy. This PR passes it by value at each call site.

Verification (Rust 1.99.0)

  • Reproduced the 3 errors on main with cargo clippy -p clickhousectl -- -D warnings
  • cargo fmt --all: no changes
  • cargo clippy -p clickhousectl -- -D warnings: clean
  • cargo clippy -p clickhousectl --all-targets --no-default-features -- -D warnings: clean
  • cargo test -p clickhousectl --bins: 1297 passed. The crate has no lib target, so --lib doesn't apply.

🤖 Generated with Claude Code

@sdairs
sdairs requested a review from iskakaushik as a code owner October 1, 2026 19:10
Latest stable clippy flags needless_borrows_for_generic_args on the three
.map_err(&project_state_error) calls. The closure captures nothing and is
Copy, so pass it by value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdairs
sdairs force-pushed the fix/clippy-needless-borrow-project-state-error branch from f7c2e13 to 1e7384f Compare October 1, 2026 19:15
@sdairs
sdairs changed the base branch from main to claude/drift-delta-cli-1038 October 1, 2026 19:15
@sdairs
sdairs added this pull request to stack #1001 October 1, 2026 19:16

This branch has not been deployed

No deployments
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.

CI: clippy needless_borrows_for_generic_args fails on latest stable in local/mod.rs

1 participant