fix(clippy): allow unused_async on the synchronous engine impls - #14
LifeInTheWeeds wants to merge 1 commit into
Conversation
CI runs `cargo clippy --all-targets --all-features -- -D warnings` against the
`stable` toolchain with nothing pinning it. A newer stable clippy began firing
`unused_async` on async trait-impl methods, producing 6 errors:
src/engine/sqlite/mod.rs:35, 77, 152
src/engine/duckdb/mod.rs:43, 63, 100
That is exactly the 3 `DatabaseEngine` methods (`validate_connection`,
`introspect`, `execute`) in the 2 engines whose drivers are synchronous. The
`postgres` and `mysql` impls are unaffected because they genuinely `.await`.
The `async` cannot be dropped: `DatabaseEngine` declares these methods as
returning futures, so every impl must match that signature regardless of
whether its body awaits. Satisfying the lint would mean hand-rolling
`impl Future` bodies purely to appease it, which is strictly worse code.
`#[allow(clippy::unused_async)]` on the two impl blocks, with a comment saying
why. This matches existing house style -- the tree already carries
`allow(clippy::future_not_send)`, `allow(clippy::too_many_arguments)` and
several others.
Note this is drift, not regression: clippy passed on main in July against this
same code. Pinning the clippy toolchain in CI would address the cause rather
than the symptom, but that is a maintainer call and out of scope here.
Ordering: main does not currently compile against duckdb >= 1.10505.0, so
clippy aborts on that error before it reaches these lints. This branch
therefore cannot go green until the `non_exhaustive` wildcard fix (first commit
of #12) lands. It is branched from main to stay single-purpose.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pWGjWtzGf4UvtgiWqYQyR
|
Superseded by #12 — closing. Splitting this out was the wrong call in practice. The fix also changed while it was here, which is the other reason it belongs where it can be tested. Two earlier attempts failed:
The real cause is that clippy 0.1.98 (Rust 1.98, 2026-09-01) split No code is lost; the branch |
Unblocks CI for #12 and #13. Two
#[allow]attributes, no behaviour change.Problem
CI runs
cargo clippy --all-targets --all-features -- -D warningsagainststable, with nothing pinning the toolchain. A newer stable clippy began firingunused_asyncon async trait-impl methods:Those 6 are exactly the 3
DatabaseEnginemethods (validate_connection,introspect,execute) in the 2 engines with synchronous drivers:async fn.awaitWhy
#[allow]rather than removingasyncDatabaseEnginedeclares these methods as returning futures, so every impl must match that signature whether or not its body awaits. Satisfying the lint would mean hand-rollingimpl Futurebodies purely to appease it — strictly worse code for no benefit.The attributes sit on the two impl blocks with a comment explaining why, matching existing house style (the tree already carries
allow(clippy::future_not_send),allow(clippy::too_many_arguments),allow(clippy::struct_excessive_bools)and others).This is drift, not regression
Clippy passed on
mainin July against this same code. Nothing in the source changed; the toolchain moved underneath it. My PRs are simply the first CI runs on this repo in two months, so they surfaced it.The root-cause fix is pinning the clippy toolchain in
.github/workflows/ci.ymlrather than chasing lints as they appear. That's your call and deliberately out of scope here — happy to send it as a follow-up if you want it.Merge order
maindoes not currently compile againstduckdb >= 1.10505.0, so clippy aborts on that error before reaching these lints. This PR cannot go green until thenon_exhaustivewildcard fix (first commit of #12) lands. It is branched frommainto stay single-purpose.Suggested order:
--engine duckdbping#13 — the MCP-32601/pingspec fixI'm happy to rebase any of the three once the first lands.
🤖 Generated with Claude Code
https://claude.ai/code/session_016pWGjWtzGf4UvtgiWqYQyR