Skip to content

clean up 105 clippy::unused_async_trait_impl / useless_format sites surfaced by Rust 1.98.0 #6746

Description

@bug-ops

Description

Rust 1.98.0 introduced clippy::unused_async_trait_impl (async trait impl functions with no .await — mostly test-only mock/stub implementations) and clippy::chunks_exact_to_as_chunks. ci.yml used a rolling dtolnay/rust-toolchain@stable toolchain ref, which picked up 1.98.0 the moment it next ran and broke on ~105 pre-existing call sites across 8 crates, unrelated to whatever PR happened to trigger that CI run (discovered via #6744).

ci.yml has been pinned to toolchain: "1.97" (matching root rust-version) as an immediate unblock — see the header comment in ci.yml. This issue tracks the actual cleanup so the toolchain pin can be lifted deliberately.

Reproduction Steps

  1. Run cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,registry,testing,deep-link" -- -D warnings on a stable toolchain >= 1.98.0
  2. Observe compile failures

Expected Behavior

Clean clippy run on current stable, with the CI toolchain pin lifted afterward.

Actual Behavior

105 call sites fail across:

Crate Count
zeph-tools 72
zeph-llm 15
zeph-sanitizer 7
zeph-context 6
zeph-agent-context 3
zeph-worktree 1
zeph-skills 1

Plus one clippy::useless_format at crates/zeph-tools/src/file.rs:1798.

Fix pattern for unused_async_trait_impl (clippy provides this exact diff per site): convert

async fn foo(&self, ...) -> T { body }

to

fn foo(&self, ...) -> impl Future<Output = T> + Send { std::future::ready(body) }

adjusting for early returns (wrap each returned value in std::future::ready, per clippy's own suggested diff at each site).

Environment

Logs / Evidence

Full clippy output with all 106 error locations captured during #6744's investigation; available on request / re-derivable via the reproduction command above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2High value, medium complexitytech-debtTechnical debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions