From 69b479ef06f38c22166b2c89b1349cf468d4cdc8 Mon Sep 17 00:00:00 2001 From: Chris Jones <190028784+LifeInTheWeeds@users.noreply.github.com> Date: Tue, 22 Sep 2026 11:44:12 -0400 Subject: [PATCH] fix(clippy): allow unused_async on the synchronous engine impls 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 Claude-Session: https://claude.ai/code/session_016pWGjWtzGf4UvtgiWqYQyR --- src/engine/duckdb/mod.rs | 6 ++++++ src/engine/sqlite/mod.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/engine/duckdb/mod.rs b/src/engine/duckdb/mod.rs index 3ef9037..b3fd546 100644 --- a/src/engine/duckdb/mod.rs +++ b/src/engine/duckdb/mod.rs @@ -39,6 +39,12 @@ pub struct DuckDbEngine; /// Default schema used when no `--schema` is provided. const DEFAULT_SCHEMA: &str = "main"; +// `DatabaseEngine` declares these methods as returning futures, so each impl must be +// `async` whether or not its body awaits. The DuckDB driver is synchronous, so all three +// methods here have no `.await` and trip `clippy::unused_async` -- a lint that cannot be +// satisfied without hand-rolling `impl Future` bodies purely to appease it. The +// `postgres` and `mysql` impls are unaffected because their drivers genuinely await. +#[allow(clippy::unused_async)] impl DatabaseEngine for DuckDbEngine { async fn validate_connection(config: &ConnectionConfig) -> Result { let file_path = extract_file_path(config)?; diff --git a/src/engine/sqlite/mod.rs b/src/engine/sqlite/mod.rs index 038b50b..b5a6210 100644 --- a/src/engine/sqlite/mod.rs +++ b/src/engine/sqlite/mod.rs @@ -31,6 +31,12 @@ use crate::error::{PlenumError, Result}; /// `SQLite` database engine implementation pub struct SqliteEngine; +// `DatabaseEngine` declares these methods as returning futures, so each impl must be +// `async` whether or not its body awaits. The SQLite driver is synchronous, so all three +// methods here have no `.await` and trip `clippy::unused_async` -- a lint that cannot be +// satisfied without hand-rolling `impl Future` bodies purely to appease it. The +// `postgres` and `mysql` impls are unaffected because their drivers genuinely await. +#[allow(clippy::unused_async)] impl DatabaseEngine for SqliteEngine { async fn validate_connection(config: &ConnectionConfig) -> Result { // Validate config is for SQLite