Repository navigation
fix: clippy::double_must_use on DispatchEngine - #15
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why not a full re-sync
Compared with the monorepo (
rustnzbcrates/nzb-dispatchata9a82d7), this mirror's sources differ in exactly one place:article_failure.rsmatchesNntpError::UnsupportedCommandandNntpError::ResponseTooLarge, variants that exist only in the monorepo'snzb-nntpand not in the publishednzb-nntp 0.2.23this crate depends on. The monorepoCargo.tomlalso usespathandworkspace = truedependencies. Copying it over would not build against crates.io, and the publishednzb-dispatch 0.2.8has 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 forasync fn shutdown. Clippy 1.99 (the toolchain CI runs) flags that asclippy::double_must_usebecause 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 atsrc/dispatch_engine.rs.Verified locally
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked— 41 passedMade with Cursor