Skip to content

fix: drop redundant borrow in ai_provider Authorization header#53

Merged
ShixiangWang merged 1 commit into
Traitome:mainfrom
andrewbudge:fix/clippy-ai-provider-borrow
Jul 17, 2026
Merged

fix: drop redundant borrow in ai_provider Authorization header#53
ShixiangWang merged 1 commit into
Traitome:mainfrom
andrewbudge:fix/clippy-ai-provider-borrow

Conversation

@andrewbudge

Copy link
Copy Markdown
Collaborator

The workspace clippy gate (cargo clippy --workspace -- -D warnings) fails on current stable (clippy >= 1.97) with useless_borrows_in_formatting:

error: redundant reference in `format!` argument
  --> crates/oxo-flow-web/src/ai_provider.rs:106
   |
   | .header("Authorization", format!("Bearer {}", &self.api_key))
   |                                                ^^^^^^^^^^^^^ help: remove the redundant `&`: `self.api_key`

This is pre-existing on main (landed in #45); newer clippy tightened the lint, so the gate now blocks every PR built on this toolchain. Fix passes the field by value. No behavior change.

clippy (>=1.97, useless_borrows_in_formatting) denies the redundant
`&` on `self.api_key` inside `format!`. Fails CI under -D warnings on
the workspace clippy gate. Pass the field by value.
@andrewbudge
andrewbudge requested a review from ShixiangWang July 15, 2026 04:42
@ShixiangWang
ShixiangWang merged commit bcec5cb into Traitome:main Jul 17, 2026
6 of 7 checks passed
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