]> Untitled Git - bdk-cli/commitdiff
CI: Fix clippy issues
authorVihiga Tyonum <withtvpeter@gmail.com>
Sun, 8 Feb 2026 05:26:42 +0000 (06:26 +0100)
committerVihiga Tyonum <withtvpeter@gmail.com>
Tue, 24 Feb 2026 06:01:36 +0000 (07:01 +0100)
Justfile
src/handlers.rs
src/payjoin/mod.rs
src/utils.rs

index 06296819d9066ebc00c3bb8f73a14fd5beae45e6..d8ccf52de4d4892ebebae37dbcb8e82f25ec68c4 100644 (file)
--- 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
index 47402456d6302dd8f0e836e747ebac1083ac6bed..2138e4c0ad2d0ee38d856da06d1e20fb3f809ed6 100644 (file)
@@ -1156,6 +1156,7 @@ pub fn handle_wallets_subcommand(datadir: &Path, pretty: bool) -> Result<String,
             .wallets
             .iter()
             .map(|(name, wallet_config)| {
+                #[allow(unused_mut)]
                 let mut wallet_json = json!({
                     "name": name,
                     "network": wallet_config.network,
index e14f97c7a03a68c4bb34e6446b2bddb329f3a136..19beb7d2b8662ccab5c65f843fcf65fabee49384 100644 (file)
@@ -608,16 +608,12 @@ impl<'a> 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);
index 448675a28b1396b428495253d615f686c0803514..76e56a0f63e9554abd4b044dcc9eb1463693df7b 100644 (file)
@@ -158,7 +158,7 @@ pub(crate) enum BlockchainClient {
     },
 
     #[cfg(feature = "cbf")]
-    KyotoClient { client: KyotoClientHandle },
+    KyotoClient { client: Box<KyotoClientHandle> },
 }
 
 /// 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),
-                },
+                }),
             }
         }
     };