]> Untitled Git - bdk/commitdiff
ci(clippy): fix missing docs errors for rust 1.83
authorSteve Myers <steve@notmandatory.org>
Mon, 6 Jan 2025 16:42:16 +0000 (10:42 -0600)
committerSteve Myers <steve@notmandatory.org>
Mon, 6 Jan 2025 17:28:30 +0000 (11:28 -0600)
examples/compiler.rs
src/database/mod.rs
src/keys/mod.rs
src/wallet/coin_selection.rs

index e17feb3ad752eb93c299ec1ab8e74f81d744b5c3..2773545eed8ea4c3a1a4f33ea20e4cb7691571e6 100644 (file)
@@ -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<dyn Error>> {
     env_logger::init_from_env(
         env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"),
index 27d6e4dbfbea7e67b9065b81eaf65fb1bfac652f..134cb6b77cbb2a49f5e15a1454459027e629ed15 100644 (file)
@@ -214,6 +214,7 @@ pub(crate) trait DatabaseUtils: Database {
 impl<T: Database> DatabaseUtils for T {}
 
 #[cfg(test)]
+#[allow(missing_docs)]
 pub mod test {
     use bitcoin::consensus::encode::deserialize;
     use bitcoin::consensus::serialize;
index 140f7dfdcea02c31c143decf0a6f8c8e0d9c5905..ac7ff57aa2099a53d3e3fdb57192ce7fdbbcfabd 100644 (file)
@@ -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::*;
index e85e2444393c3618e7339a2f917c5757b9056204..0d35f7e108c6b190b6df5314f4da3f62d4109b2e 100644 (file)
@@ -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)