From 6a5b418f6c88127bd9af22f18d859bafd6403d8c Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Mon, 6 Jan 2025 10:42:16 -0600 Subject: [PATCH] ci(clippy): fix missing docs errors for rust 1.83 --- examples/compiler.rs | 1 - src/database/mod.rs | 1 + src/keys/mod.rs | 2 +- src/wallet/coin_selection.rs | 5 ++++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/compiler.rs b/examples/compiler.rs index e17feb3a..2773545e 100644 --- a/examples/compiler.rs +++ b/examples/compiler.rs @@ -35,7 +35,6 @@ use bdk::{KeychainKind, Wallet}; /// can be derived from the policy. /// /// This example demonstrates the interaction between a bdk wallet and miniscript policy. - fn main() -> Result<(), Box> { env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), diff --git a/src/database/mod.rs b/src/database/mod.rs index 27d6e4db..134cb6b7 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -214,6 +214,7 @@ pub(crate) trait DatabaseUtils: Database { impl DatabaseUtils for T {} #[cfg(test)] +#[allow(missing_docs)] pub mod test { use bitcoin::consensus::encode::deserialize; use bitcoin::consensus::serialize; diff --git a/src/keys/mod.rs b/src/keys/mod.rs index 140f7dfd..ac7ff57a 100644 --- a/src/keys/mod.rs +++ b/src/keys/mod.rs @@ -949,7 +949,7 @@ impl std::fmt::Display for KeyError { impl std::error::Error for KeyError {} #[cfg(test)] -pub mod test { +mod test { use bitcoin::bip32; use super::*; diff --git a/src/wallet/coin_selection.rs b/src/wallet/coin_selection.rs index e85e2444..0d35f7e1 100644 --- a/src/wallet/coin_selection.rs +++ b/src/wallet/coin_selection.rs @@ -119,8 +119,11 @@ use std::convert::TryInto; /// overridden #[cfg(not(test))] pub type DefaultCoinSelectionAlgorithm = BranchAndBoundCoinSelection; + +/// Default deterministic coin selection algorithm for testing used by [`TxBuilder`](super::tx_builder::TxBuilder) if not +/// overridden #[cfg(test)] -pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; // make the tests more predictable +pub type DefaultCoinSelectionAlgorithm = LargestFirstCoinSelection; // Base weight of a Txin, not counting the weight needed for satisfying it. // prev_txid (32 bytes) + prev_vout (4 bytes) + sequence (4 bytes) -- 2.49.0