From: Vihiga Tyonum Date: Sun, 8 Feb 2026 05:26:42 +0000 (+0100) Subject: CI: Fix clippy issues X-Git-Url: http://internal-gitweb-vhost/parse/%22https:/encode/enum.Error.html?a=commitdiff_plain;h=aba4b950aa95f52d277035a7016116828ee29c4e;p=bdk-cli CI: Fix clippy issues --- diff --git a/Justfile b/Justfile index 0629681..d8ccf52 100644 --- a/Justfile +++ b/Justfile @@ -27,11 +27,8 @@ test: # checks before pushing pre-push: - cargo build --features default cargo test --features default - cargo build --no-default-features cargo test --no-default-features - cargo build --all-features cargo test --all-features cargo clippy --no-default-features --all-targets -- -D warnings cargo clippy --all-features --all-targets -- -D warnings diff --git a/src/handlers.rs b/src/handlers.rs index 4740245..2138e4c 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -1156,6 +1156,7 @@ pub fn handle_wallets_subcommand(datadir: &Path, pretty: bool) -> Result PayjoinManager<'a> { return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain")); }; - let is_seen = match tx_details.chain_position { - bdk_wallet::chain::ChainPosition::Confirmed { .. } => true, - bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. } => true, - _ => false - }; + let is_seen = matches!(tx_details.chain_position, bdk_wallet::chain::ChainPosition::Confirmed { .. } | bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. }); if is_seen { return Ok(Some(tx_details.tx.as_ref().clone())); } - return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain")); + Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain")) }, |outpoint| { let utxo = self.wallet.get_utxo(outpoint); diff --git a/src/utils.rs b/src/utils.rs index 448675a..76e56a0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -158,7 +158,7 @@ pub(crate) enum BlockchainClient { }, #[cfg(feature = "cbf")] - KyotoClient { client: KyotoClientHandle }, + KyotoClient { client: Box }, } /// Handle for the Kyoto client after the node has been started. @@ -195,7 +195,7 @@ pub(crate) fn new_blockchain_client( } #[cfg(feature = "esplora")] ClientType::Esplora => { - let client = bdk_esplora::esplora_client::Builder::new(&url).build_async()?; + let client = bdk_esplora::esplora_client::Builder::new(url).build_async()?; BlockchainClient::Esplora { client: Box::new(client), parallel_requests: wallet_opts.parallel_requests, @@ -245,10 +245,10 @@ pub(crate) fn new_blockchain_client( ); BlockchainClient::KyotoClient { - client: KyotoClientHandle { + client: Box::new(KyotoClientHandle { requester, update_subscriber: tokio::sync::Mutex::new(update_subscriber), - }, + }), } } };