Skip to content

fix(clippy): resolve two lints that fail -Dwarnings on clippy 1.97 - #73

Closed
kkdao wants to merge 1 commit into
bitcoindevkit:masterfrom
kkdao:fix/clippy-useless-conversion
Closed

kkdao wants to merge 1 commit into
bitcoindevkit:masterfrom
kkdao:fix/clippy-useless-conversion

Conversation

@kkdao

@kkdao kkdao commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

cargo clippy --all-targets --all-features -- -Dwarnings currently fails on master with two lints. Both are style-only; neither changes behaviour.

clippy::useless_conversionoracles/src/tweaks/blindbit.rs:184

futures::stream::iter takes an IntoIterator, so calling .into_iter() on the map first is redundant.

clippy::question_markcli/v2/src/main.rs:413

The spawned task matched on the node error only to return it unchanged. Note that clippy's own suggestion (node.run().await?; followed by Ok(())) does not compile — with the explicit return Err(e) gone there is nothing left to infer the Result's error type from, so it fails with E0282. Returning the future's result directly is equivalent, avoids the annotation, and matches how blindbit_subscriber and the other tasks are spawned a few lines below.

These only fire on newer clippy — observed on 1.97 — which is likely why CI hasn't caught them yet.

Notes to the reviewers

Neither hunk can change runtime behaviour: stream::iter calls .into_iter() itself, and in the CLI the Result goes into a JoinHandle that nothing awaits, before or after.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Two pre-existing lints fail `cargo clippy --all-targets --all-features
-- -Dwarnings` on clippy 1.97:

- `useless_conversion` in the blindbit tweak subscriber:
  `futures::stream::iter` takes an `IntoIterator`, so calling
  `.into_iter()` on the map first is redundant.
- `question_mark` in the v2 CLI: the spawned task matched on the node
  error only to return it unchanged. Returning the future's result
  directly is equivalent and matches how the other subscribers are
  spawned a few lines below.

Neither changes behaviour.
@kkdao kkdao closed this Aug 26, 2026
@kkdao
kkdao deleted the fix/clippy-useless-conversion branch August 26, 2026 17:20
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