Skip to content

Commit aba4b95

Browse files
committed
CI: Fix clippy issues
1 parent cc3c8a2 commit aba4b95

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

Justfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ test:
2727

2828
# checks before pushing
2929
pre-push:
30-
cargo build --features default
3130
cargo test --features default
32-
cargo build --no-default-features
3331
cargo test --no-default-features
34-
cargo build --all-features
3532
cargo test --all-features
3633
cargo clippy --no-default-features --all-targets -- -D warnings
3734
cargo clippy --all-features --all-targets -- -D warnings

src/handlers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,7 @@ pub fn handle_wallets_subcommand(datadir: &Path, pretty: bool) -> Result<String,
11561156
.wallets
11571157
.iter()
11581158
.map(|(name, wallet_config)| {
1159+
#[allow(unused_mut)]
11591160
let mut wallet_json = json!({
11601161
"name": name,
11611162
"network": wallet_config.network,

src/payjoin/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,16 +608,12 @@ impl<'a> PayjoinManager<'a> {
608608
return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"));
609609
};
610610

611-
let is_seen = match tx_details.chain_position {
612-
bdk_wallet::chain::ChainPosition::Confirmed { .. } => true,
613-
bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. } => true,
614-
_ => false
615-
};
611+
let is_seen = matches!(tx_details.chain_position, bdk_wallet::chain::ChainPosition::Confirmed { .. } | bdk_wallet::chain::ChainPosition::Unconfirmed { first_seen: Some(_), .. });
616612

617613
if is_seen {
618614
return Ok(Some(tx_details.tx.as_ref().clone()));
619615
}
620-
return Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"));
616+
Err(ImplementationError::from("Cannot find the transaction in the mempool or the blockchain"))
621617
},
622618
|outpoint| {
623619
let utxo = self.wallet.get_utxo(outpoint);

src/utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ pub(crate) enum BlockchainClient {
158158
},
159159

160160
#[cfg(feature = "cbf")]
161-
KyotoClient { client: KyotoClientHandle },
161+
KyotoClient { client: Box<KyotoClientHandle> },
162162
}
163163

164164
/// Handle for the Kyoto client after the node has been started.
@@ -195,7 +195,7 @@ pub(crate) fn new_blockchain_client(
195195
}
196196
#[cfg(feature = "esplora")]
197197
ClientType::Esplora => {
198-
let client = bdk_esplora::esplora_client::Builder::new(&url).build_async()?;
198+
let client = bdk_esplora::esplora_client::Builder::new(url).build_async()?;
199199
BlockchainClient::Esplora {
200200
client: Box::new(client),
201201
parallel_requests: wallet_opts.parallel_requests,
@@ -245,10 +245,10 @@ pub(crate) fn new_blockchain_client(
245245
);
246246

247247
BlockchainClient::KyotoClient {
248-
client: KyotoClientHandle {
248+
client: Box::new(KyotoClientHandle {
249249
requester,
250250
update_subscriber: tokio::sync::Mutex::new(update_subscriber),
251-
},
251+
}),
252252
}
253253
}
254254
};

0 commit comments

Comments
 (0)