Skip to content

fix: clippy::double_must_use on DispatchEngine - #15

Merged
thedancingdeveloper merged 1 commit into
mainfrom
fix/sync-from-monorepo
Oct 9, 2026
Merged

thedancingdeveloper merged 1 commit into
mainfrom
fix/sync-from-monorepo

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Why not a full re-sync

Compared with the monorepo (rustnzb crates/nzb-dispatch at a9a82d7), this mirror's sources differ in exactly one place: article_failure.rs matches NntpError::UnsupportedCommand and NntpError::ResponseTooLarge, variants that exist only in the monorepo's nzb-nntp and not in the published nzb-nntp 0.2.23 this crate depends on. The monorepo Cargo.toml also uses path and workspace = true dependencies. Copying it over would not build against crates.io, and the published nzb-dispatch 0.2.8 has the same clippy failure, so it is not a source for the fix either.

What this does

#[async_trait] stamps a message-less #[must_use] on the boxed future it generates for async fn shutdown. Clippy 1.99 (the toolchain CI runs) flags that as clippy::double_must_use because the boxed future is already must-use, and the lint is deny-by-default here via -D warnings. The attribute comes from the macro, so the suppression goes on the trait at src/dispatch_engine.rs.

Verified locally

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --locked — 41 passed

Made with Cursor

async_trait emits a message-less #[must_use] on the boxed future it
returns for `async fn shutdown`, and clippy 1.99 rejects that as
double_must_use because the boxed future is already must-use. The
attribute is generated by the macro, so the allow has to live on the
trait. The monorepo crate is identical here and will hit the same lint
once it is published.

A full re-sync is not warranted: the monorepo's nzb-dispatch differs
only in an NntpError match arm for variants that are not in the
published nzb-nntp this mirror depends on, and its Cargo.toml uses
path and workspace dependencies.
@thedancingdeveloper
thedancingdeveloper merged commit 11e37b4 into main Oct 9, 2026
3 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the fix/sync-from-monorepo branch October 9, 2026 02:51
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.

1 participant