Skip to content

fix(audit): remove useless borrow in syslog format! argument - #11

Merged
fylorn merged 1 commit into
ThinkWatchProject:mainfrom
DaniW42:fix/clippy-useless-borrow-forwarders
Sep 12, 2026
Merged

fylorn merged 1 commit into
ThinkWatchProject:mainfrom
DaniW42:fix/clippy-useless-borrow-forwarders

Conversation

@DaniW42

@DaniW42 DaniW42 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Trivial clippy::useless_borrows_in_formatting fix in crates/common/src/audit/forwarders.rs.

Not connected to any other change. Found while running cargo clippy --workspace locally ahead of an unrelated PR — CI's Rust job pulls dtolnay/rust-toolchain@stable unpinned, so this trips on the current stable Rust release even though it was clean when main last built (2026-05-27). Submitted standalone so it doesn't distract from that PR's diff.

-        ts = &entry.created_at,
+        ts = entry.created_at,

Verified: cargo clippy -p think-watch-common --all-targets -- -D warnings passes after this change.

Trivial clippy::useless_borrows_in_formatting fix. Not connected to
any other change -- found while running clippy locally ahead of an
unrelated PR and noticed CI's Rust job pulls dtolnay/rust-toolchain@stable
unpinned, so this trips CI on the current stable release even though
it was clean when main last built (2026-05-27). Submitted standalone
so it does not distract from that PR's diff.
@fylorn
fylorn merged commit 9d812cc into ThinkWatchProject:main Sep 12, 2026
fylorn pushed a commit that referenced this pull request Sep 12, 2026
Fixes CI: clippy 1.98's useless_borrows_in_formatting is an error under
-D warnings.
fylorn added a commit that referenced this pull request Sep 12, 2026
Three separate things, all found by upgrading the local toolchain from
1.95 to 1.98 — the same gap that let #11's lint reach main unnoticed.

- `useless_borrows_in_formatting` fires in two more places that #11
  didn't touch: `crates/server/src/handlers/log_forwarders.rs` and
  `crates/test-support/tests/body_offload.rs`. Same one-character fix.
- `result_large_err` on the two MCP lifecycle stages is a false positive
  here, and the comment says so with numbers: the `Ok` variant is 296
  bytes against the `Err`'s 152, so the `Result` is sized by `Ok`
  either way, and `Box<JsonRpcResponse>` measures the same 296 while
  adding an allocation on the short-circuit path. Allowed rather than
  boxed, with the measurement recorded so nobody "fixes" it later.
- `Cargo.lock` repointed at core's current `main`. Core's history was
  rewritten (commit messages translated to English), so every SHA
  changed and the previously locked one is no longer reachable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants