From d253ee25baf81f333a51d3741f7104ad037516a7 Mon Sep 17 00:00:00 2001 From: kkdao <44775666+kkdao@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:58:46 -0400 Subject: [PATCH] fix(clippy): silence lints from newer clippy 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. --- cli/v2/src/main.rs | 7 +------ oracles/src/tweaks/blindbit.rs | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cli/v2/src/main.rs b/cli/v2/src/main.rs index 2a31fcd..ac0336b 100644 --- a/cli/v2/src/main.rs +++ b/cli/v2/src/main.rs @@ -409,12 +409,7 @@ async fn main() -> anyhow::Result<()> { FilterSubscriber::new(db_buffer, event_rx, changes_tx, sync_point.height); tracing::info!("Starting the node..."); - tokio::task::spawn(async move { - if let Err(e) = node.run().await { - return Err(e); - } - Ok(()) - }); + tokio::task::spawn(async move { node.run().await }); tracing::info!("Starting blindbit subscriber..."); tokio::task::spawn(async move { blindbit_subscriber.run().await }); diff --git a/oracles/src/tweaks/blindbit.rs b/oracles/src/tweaks/blindbit.rs index 0b77150..b3bed19 100644 --- a/oracles/src/tweaks/blindbit.rs +++ b/oracles/src/tweaks/blindbit.rs @@ -181,7 +181,7 @@ impl BlindbitSubscriber { .unwrap_or_default(); let client = self.client.clone(); - let mut stream = futures::stream::iter(changes.writes.into_iter()) + let mut stream = futures::stream::iter(changes.writes) .map(move |(height, hash)| { let client = client.clone(); async move {