From: github-actions Date: Mon, 26 Dec 2022 22:14:16 +0000 (+0000) Subject: Publish autogenerated nightly docs X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/static/struct.PushBytesError.html?a=commitdiff_plain;h=d037f2ecc9e04119cfb5b4da8fae7b84204d32b5;p=bitcoindevkit.org Publish autogenerated nightly docs --- diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/checksum/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/checksum/index.html index e72865b92d..0ef4d02787 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/checksum/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/checksum/index.html @@ -1,5 +1,5 @@ bdk::descriptor::checksum - Rust

Module bdk::descriptor::checksum

source ·
Expand description

Descriptor checksum

+ logo

Module checksum

Module bdk::descriptor::checksum

source ·
Expand description

Descriptor checksum

This module contains a re-implementation of the function used by Bitcoin Core to calculate the checksum of a descriptor

Functions

Compute the checksum of a descriptor, excludes any existing checksum in the descriptor string from the calculation
Compute the checksum bytes of a descriptor, excludes any existing checksum in the descriptor string from the calculation
get_checksumDeprecated
Compute the checksum of a descriptor
Compute the checksum bytes of a descriptor
\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/index.html index 3589458fcd..f829f28390 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/index.html @@ -1,5 +1,5 @@ bdk::descriptor - Rust

Module bdk::descriptor

source ·
Expand description

Descriptors

+ logo

Module descriptor

Module bdk::descriptor

source ·
Expand description

Descriptors

This module contains generic utilities to work with descriptors, plus some re-exported types from [miniscript].

Re-exports

pub use self::checksum::calc_checksum;
pub use self::error::Error as DescriptorError;
pub use self::policy::Policy;

Modules

Descriptor checksum
Descriptor errors
Descriptor policy
Descriptor templates

Structs

An extended key with origin, derivation path, and wildcard.
Top-level script AST type

Enums

Script descriptor
The descriptor pubkey, either a single pubkey or an xpub.
Legacy ScriptContext diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/index.html index 7f5ea7f940..f85ebcf87f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/policy/index.html @@ -1,5 +1,5 @@ bdk::descriptor::policy - Rust

Module bdk::descriptor::policy

source ·
Expand description

Descriptor policy

+ logo

Module policy

Module bdk::descriptor::policy

source ·
Expand description

Descriptor policy

This module implements the logic to extract and represent the spending policies of a descriptor in a more human-readable format.

This is an EXPERIMENTAL feature, API and other major changes are expected.

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/template/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/template/index.html index 9094d8b362..4af201d67f 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/template/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/descriptor/template/index.html @@ -1,5 +1,5 @@ bdk::descriptor::template - Rust

Module bdk::descriptor::template

source ·
Expand description

Descriptor templates

+ logo

Module template

Module bdk::descriptor::template

source ·
Expand description

Descriptor templates

This module contains the definition of various common script templates that are ready to be used. See the documentation of each template for an example.

Structs

BIP44 template. Expands to pkh(key/44'/{0,1}'/0'/{0,1}/*)
BIP44 public template. Expands to pkh(key/{0,1}/*)
BIP49 template. Expands to sh(wpkh(key/49'/{0,1}'/0'/{0,1}/*))
BIP49 public template. Expands to sh(wpkh(key/{0,1}/*))
BIP84 template. Expands to wpkh(key/84'/{0,1}'/0'/{0,1}/*)
BIP84 public template. Expands to wpkh(key/{0,1}/*)
P2PKH template. Expands to a descriptor pkh(key)
P2WPKH template. Expands to a descriptor wpkh(key)
P2WPKH-P2SH template. Expands to a descriptor sh(wpkh(key))

Traits

Trait for descriptor templates that can be built into a full descriptor

Type Definitions

Type alias for the return type of DescriptorTemplate, descriptor! and others
\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/fn.version.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/fn.version.html index cc5777496c..fc1da06f07 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/fn.version.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/fn.version.html @@ -1,3 +1,3 @@ version in bdk - Rust

Function bdk::version

source ·
pub fn version() -> &'static str
Expand description

Get the version of BDK at runtime

+ logo

Function bdk::version

source ·
pub fn version() -> &'static str
Expand description

Get the version of BDK at runtime

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html index 468838c4ab..53aa736326 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/index.html @@ -1,5 +1,5 @@ bdk - Rust

Crate bdk

source ·
Expand description

A modern, lightweight, descriptor-based wallet library written in Rust.

+ logo

Crate bdk

Crate bdk

source ·
Expand description

A modern, lightweight, descriptor-based wallet library written in Rust.

About

The BDK library aims to be the core building block for Bitcoin wallets of any kind.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html index 83424c5cd3..625c3d161b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/coin_selection/index.html @@ -1,5 +1,5 @@ bdk::wallet::coin_selection - Rust

    Module bdk::wallet::coin_selection

    source ·
    Expand description

    Coin selection

    + logo

    Module coin_selection

    Module bdk::wallet::coin_selection

    source ·
    Expand description

    Coin selection

    This module provides the trait CoinSelectionAlgorithm that can be implemented to define custom coin selection algorithms.

    You can specify a custom coin selection algorithm through the coin_selection method on diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/index.html index 15b192779d..264deb611b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/index.html @@ -1,5 +1,5 @@ bdk::wallet - Rust

    Module bdk::wallet

    source ·
    Expand description

    Wallet

    + logo

    Module wallet

    Module bdk::wallet

    source ·
    Expand description

    Wallet

    This module defines the Wallet structure.

    Modules

    Coin selection
    Wallet export
    hardwaresignerhardware-signer
    HWI Signer
    Generalized signers
    Cross-platform time
    Transaction builder
    verifyverify
    Verify transactions against the consensus rules

    Structs

    A derived address and the index it was found at For convenience this automatically derefs to Address
    Options to a sync.
    A Bitcoin wallet

    Enums

    The address index selection strategy to use to derived an address from the wallet’s external diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html index 66944dd0f9..fcaca98b20 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/signer/index.html @@ -1,5 +1,5 @@ bdk::wallet::signer - Rust

    Module bdk::wallet::signer

    source ·
    Expand description

    Generalized signers

    + logo

    Module signer

    Module bdk::wallet::signer

    source ·
    Expand description

    Generalized signers

    This module provides the ability to add customized signers to a Wallet through the Wallet::add_signer function.

    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/verify/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/verify/index.html index 4a90044725..365a44a22c 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/verify/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/wallet/verify/index.html @@ -1,3 +1,3 @@ bdk::wallet::verify - Rust

    Module bdk::wallet::verify

    source ·
    Available on crate feature verify only.
    Expand description

    Verify transactions against the consensus rules

    + logo

    Module verify

    Module bdk::wallet::verify

    source ·
    Available on crate feature verify only.
    Expand description

    Verify transactions against the consensus rules

    Enums

    Error during validation of a tx agains the consensus rules

    Functions

    Verify a transaction against the consensus rules
    \ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/blockchain/compact_filters/sync.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/blockchain/compact_filters/sync.rs.html index 08aece0178..486cb9ade3 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/blockchain/compact_filters/sync.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/blockchain/compact_filters/sync.rs.html @@ -434,7 +434,7 @@ let resp = peer.get_cf_headers(0x00, start_height as u32, stop_hash)?; - assert!(resp.previous_filter_header == checkpoint); + assert_eq!(resp.previous_filter_header, checkpoint); status = self.cf_store .advance_to_cf_headers(index, checkpoint, resp.filter_hashes)?; diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html index 89ada38c57..c15449fc52 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html @@ -1146,8 +1146,6 @@ 1145 1146 1147 -1148 -1149
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -2287,12 +2285,10 @@
                 let child: u32 = row.get(1).unwrap();
                 let count: usize = row.get(2).unwrap();
     
    -            assert!(
    -                count == 1,
    +            assert_eq!(
    +                count, 1,
                     "keychain={}, child={}, count={}",
    -                keychain,
    -                child,
    -                count
    +                keychain, child, count
                 );
             }
         }
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/checksum.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/checksum.rs.html
    index 90e9d0a01f..3ea964b7c1 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/checksum.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/checksum.rs.html
    @@ -179,6 +179,7 @@
     178
     179
     180
    +181
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -314,6 +315,7 @@
     mod test {
         use super::*;
         use crate::descriptor::calc_checksum;
    +    use assert_matches::assert_matches;
     
         // test calc_checksum() function; it should return the same value as Bitcoin Core
         #[test]
    @@ -336,16 +338,16 @@
             assert_eq!(calc_checksum(desc).unwrap(), "lasegmfs");
     
             let desc = "wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)#tqz0nc26";
    -        assert!(matches!(
    -            calc_checksum(desc).err(),
    -            Some(DescriptorError::InvalidDescriptorChecksum)
    -        ));
    +        assert_matches!(
    +            calc_checksum(desc),
    +            Err(DescriptorError::InvalidDescriptorChecksum)
    +        );
     
             let desc = "pkh(tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/44'/1'/0'/0/*)#lasegmsf";
    -        assert!(matches!(
    -            calc_checksum(desc).err(),
    -            Some(DescriptorError::InvalidDescriptorChecksum)
    -        ));
    +        assert_matches!(
    +            calc_checksum(desc),
    +            Err(DescriptorError::InvalidDescriptorChecksum)
    +        );
         }
     
         #[test]
    @@ -353,10 +355,10 @@
             let sparkle_heart = unsafe { std::str::from_utf8_unchecked(&[240, 159, 146, 150]) };
             let invalid_desc = format!("wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcL{}fjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)", sparkle_heart);
     
    -        assert!(matches!(
    -            calc_checksum(&invalid_desc).err(),
    -            Some(DescriptorError::InvalidDescriptorCharacter(invalid_char)) if invalid_char == sparkle_heart.as_bytes()[0]
    -        ));
    +        assert_matches!(
    +            calc_checksum(&invalid_desc),
    +            Err(DescriptorError::InvalidDescriptorCharacter(invalid_char)) if invalid_char == sparkle_heart.as_bytes()[0]
    +        );
         }
     }
     
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/mod.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/mod.rs.html index 54b63ae618..7f7e081ef5 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/mod.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/mod.rs.html @@ -872,21 +872,6 @@ 871 872 873 -874 -875 -876 -877 -878 -879 -880 -881 -882 -883 -884 -885 -886 -887 -888
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -1470,6 +1455,7 @@
     mod test {
         use std::str::FromStr;
     
    +    use assert_matches::assert_matches;
         use bitcoin::consensus::encode::deserialize;
         use bitcoin::hashes::hex::FromHex;
         use bitcoin::secp256k1::Secp256k1;
    @@ -1652,17 +1638,11 @@
     
             let desc = "wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)#67ju93jw"
                 .into_wallet_descriptor(&secp, Network::Testnet);
    -        assert!(matches!(
    -            desc.err(),
    -            Some(DescriptorError::InvalidDescriptorChecksum)
    -        ));
    +        assert_matches!(desc, Err(DescriptorError::InvalidDescriptorChecksum));
     
             let desc = "wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)#67ju93jw"
                 .into_wallet_descriptor(&secp, Network::Testnet);
    -        assert!(matches!(
    -            desc.err(),
    -            Some(DescriptorError::InvalidDescriptorChecksum)
    -        ));
    +        assert_matches!(desc, Err(DescriptorError::InvalidDescriptorChecksum));
         }
     
         // test IntoWalletDescriptor trait from &str with keys from right and wrong network
    @@ -1696,17 +1676,11 @@
     
             let desc = "wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcLNfjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)"
                 .into_wallet_descriptor(&secp, Network::Bitcoin);
    -        assert!(matches!(
    -            desc.err(),
    -            Some(DescriptorError::Key(KeyError::InvalidNetwork))
    -        ));
    +        assert_matches!(desc, Err(DescriptorError::Key(KeyError::InvalidNetwork)));
     
             let desc = "wpkh(tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/1/2/*)"
                 .into_wallet_descriptor(&secp, Network::Bitcoin);
    -        assert!(matches!(
    -            desc.err(),
    -            Some(DescriptorError::Key(KeyError::InvalidNetwork))
    -        ));
    +        assert_matches!(desc, Err(DescriptorError::Key(KeyError::InvalidNetwork)));
         }
     
         // test IntoWalletDescriptor trait from the output of the descriptor!() macro
    @@ -1740,11 +1714,7 @@
             let descriptor = "wpkh(tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/0'/1/2/*)";
             let result = into_wallet_descriptor_checked(descriptor, &secp, Network::Testnet);
     
    -        assert!(result.is_err());
    -        assert!(matches!(
    -            result.unwrap_err(),
    -            DescriptorError::HardenedDerivationXpub
    -        ));
    +        assert_matches!(result, Err(DescriptorError::HardenedDerivationXpub));
     
             let descriptor = "wsh(multi(2,tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/0/*,tpubD6NzVbkrYhZ4XHndKkuB8FifXm8r5FQHwrN6oZuWCz13qb93rtgKvD4PQsqC4HP4yhV3tA2fqr2RbY5mNXfM7RxXUoeABoDtsFUq2zJq6YK/0/*))";
             let result = into_wallet_descriptor_checked(descriptor, &secp, Network::Testnet);
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/policy.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/policy.rs.html
    index 439662a4d4..aa56ef1ec6 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/policy.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/policy.rs.html
    @@ -1875,52 +1875,6 @@
     1874
     1875
     1876
    -1877
    -1878
    -1879
    -1880
    -1881
    -1882
    -1883
    -1884
    -1885
    -1886
    -1887
    -1888
    -1889
    -1890
    -1891
    -1892
    -1893
    -1894
    -1895
    -1896
    -1897
    -1898
    -1899
    -1900
    -1901
    -1902
    -1903
    -1904
    -1905
    -1906
    -1907
    -1908
    -1909
    -1910
    -1911
    -1912
    -1913
    -1914
    -1915
    -1916
    -1917
    -1918
    -1919
    -1920
    -1921
    -1922
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -3062,6 +3016,7 @@
         use crate::descriptor::policy::SatisfiableItem::{EcdsaSignature, Multisig, Thresh};
         use crate::keys::{DescriptorKey, IntoDescriptorKey};
         use crate::wallet::signer::SignersContainer;
    +    use assert_matches::assert_matches;
         use bitcoin::secp256k1::Secp256k1;
         use bitcoin::util::bip32;
         use bitcoin::Network;
    @@ -3105,8 +3060,8 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint));
    -        assert!(matches!(&policy.contribution, Satisfaction::None));
    +        assert_matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint);
    +        assert_matches!(&policy.contribution, Satisfaction::None);
     
             let desc = descriptor!(wpkh(prvkey)).unwrap();
             let (wallet_desc, keymap) = desc
    @@ -3118,10 +3073,8 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint));
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None)
    -        );
    +        assert_matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint);
    +        assert_matches!(&policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None);
         }
     
         // 2 pub keys descriptor, required 2 prv keys
    @@ -3140,19 +3093,16 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(&policy.item, Multisig { keys, threshold } if threshold == &2usize
    +        assert_matches!(&policy.item, Multisig { keys, threshold } if threshold == &2usize
                 && keys[0] == PkOrF::Fingerprint(fingerprint0)
    -            && keys[1] == PkOrF::Fingerprint(fingerprint1))
    +            && keys[1] == PkOrF::Fingerprint(fingerprint1)
             );
             // TODO should this be "Satisfaction::None" since we have no prv keys?
             // TODO should items and conditions not be empty?
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::Partial { n, m, items, conditions, ..} if n == &2usize
    +        assert_matches!(&policy.contribution, Satisfaction::Partial { n, m, items, conditions, ..} if n == &2usize
                 && m == &2usize
                 && items.is_empty()
                 && conditions.is_empty()
    -            )
             );
         }
     
    @@ -3171,18 +3121,15 @@
                 .extract_policy(&signers_container, BuildSatisfaction::None, &secp)
                 .unwrap()
                 .unwrap();
    -        assert!(
    -            matches!(&policy.item, Multisig { keys, threshold } if threshold == &2usize
    +        assert_matches!(&policy.item, Multisig { keys, threshold } if threshold == &2usize
                 && keys[0] == PkOrF::Fingerprint(fingerprint0)
    -            && keys[1] == PkOrF::Fingerprint(fingerprint1))
    +            && keys[1] == PkOrF::Fingerprint(fingerprint1)
             );
     
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::Partial { n, m, items, conditions, ..} if n == &2usize
    +        assert_matches!(&policy.contribution, Satisfaction::Partial { n, m, items, conditions, ..} if n == &2usize
                  && m == &2usize
                  && items.len() == 1
                  && conditions.contains_key(&0)
    -            )
             );
         }
     
    @@ -3204,18 +3151,15 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(&policy.item, Multisig { keys, threshold } if threshold == &1
    +        assert_matches!(&policy.item, Multisig { keys, threshold } if threshold == &1
                 && keys[0] == PkOrF::Fingerprint(fingerprint0)
    -            && keys[1] == PkOrF::Fingerprint(fingerprint1))
    +            && keys[1] == PkOrF::Fingerprint(fingerprint1)
             );
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2
    +        assert_matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2
                  && m == &1
                  && items.len() == 2
                  && conditions.contains_key(&vec![0])
                  && conditions.contains_key(&vec![1])
    -            )
             );
         }
     
    @@ -3236,18 +3180,15 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(&policy.item, Multisig { keys, threshold } if threshold == &2
    +        assert_matches!(&policy.item, Multisig { keys, threshold } if threshold == &2
                 && keys[0] == PkOrF::Fingerprint(fingerprint0)
    -            && keys[1] == PkOrF::Fingerprint(fingerprint1))
    +            && keys[1] == PkOrF::Fingerprint(fingerprint1)
             );
     
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2
    +        assert_matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &2
                  && m == &2
                  && items.len() == 2
                  && conditions.contains_key(&vec![0,1])
    -            )
             );
         }
     
    @@ -3268,8 +3209,8 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint));
    -        assert!(matches!(&policy.contribution, Satisfaction::None));
    +        assert_matches!(&policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == &fingerprint);
    +        assert_matches!(&policy.contribution, Satisfaction::None);
     
             let desc = descriptor!(wpkh(prvkey)).unwrap();
             let (wallet_desc, keymap) = desc
    @@ -3281,10 +3222,8 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(matches!(policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == fingerprint));
    -        assert!(
    -            matches!(policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None)
    -        );
    +        assert_matches!(policy.item, EcdsaSignature(PkOrF::Fingerprint(f)) if f == fingerprint);
    +        assert_matches!(policy.contribution, Satisfaction::Complete {condition} if condition.csv == None && condition.timelock == None);
         }
     
         // single key, 1 prv and 1 pub key descriptor, required 1 prv keys
    @@ -3305,18 +3244,15 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(policy.item, Multisig { keys, threshold } if threshold == 1
    +        assert_matches!(policy.item, Multisig { keys, threshold } if threshold == 1
                 && keys[0] == PkOrF::Fingerprint(fingerprint0)
    -            && keys[1] == PkOrF::Fingerprint(fingerprint1))
    +            && keys[1] == PkOrF::Fingerprint(fingerprint1)
             );
    -        assert!(
    -            matches!(policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == 2
    +        assert_matches!(policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == 2
                  && m == 1
                  && items.len() == 2
                  && conditions.contains_key(&vec![0])
                  && conditions.contains_key(&vec![1])
    -            )
             );
         }
     
    @@ -3348,18 +3284,14 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(&policy.item, Thresh { items, threshold } if items.len() == 3 && threshold == &2)
    -        );
    +        assert_matches!(&policy.item, Thresh { items, threshold } if items.len() == 3 && threshold == &2);
     
    -        assert!(
    -            matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &3
    +        assert_matches!(&policy.contribution, Satisfaction::PartialComplete { n, m, items, conditions, .. } if n == &3
                  && m == &2
                  && items.len() == 3
                  && conditions.get(&vec![0,1]).unwrap().iter().next().unwrap().csv.is_none()
                  && conditions.get(&vec![0,2]).unwrap().iter().next().unwrap().csv == Some(Sequence(sequence))
                  && conditions.get(&vec![1,2]).unwrap().iter().next().unwrap().csv == Some(Sequence(sequence))
    -            )
             );
         }
     
    @@ -3522,11 +3454,9 @@
                 .unwrap();
             //println!("{}", serde_json::to_string(&policy_alice_psbt).unwrap());
     
    -        assert!(
    -            matches!(&policy_alice_psbt.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &2
    +        assert_matches!(&policy_alice_psbt.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &2
                  && m == &2
                  && items == &vec![0]
    -            )
             );
     
             let psbt = Psbt::from_str(BOB_SIGNED_PSBT).unwrap();
    @@ -3536,11 +3466,9 @@
                 .unwrap();
             //println!("{}", serde_json::to_string(&policy_bob_psbt).unwrap());
     
    -        assert!(
    -            matches!(&policy_bob_psbt.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &2
    +        assert_matches!(&policy_bob_psbt.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &2
                  && m == &2
                  && items == &vec![1]
    -            )
             );
     
             let psbt = Psbt::from_str(ALICE_BOB_SIGNED_PSBT).unwrap();
    @@ -3548,11 +3476,9 @@
                 .extract_policy(&signers_container, BuildSatisfaction::Psbt(&psbt), &secp)
                 .unwrap()
                 .unwrap();
    -        assert!(
    -            matches!(&policy_alice_bob_psbt.satisfaction, Satisfaction::PartialComplete { n, m, items, .. } if n == &2
    +        assert_matches!(&policy_alice_bob_psbt.satisfaction, Satisfaction::PartialComplete { n, m, items, .. } if n == &2
                  && m == &2
                  && items == &vec![0, 1]
    -            )
             );
         }
     
    @@ -3596,11 +3522,9 @@
                 .extract_policy(&signers_container, build_sat, &secp)
                 .unwrap()
                 .unwrap();
    -        assert!(
    -            matches!(&policy.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &3
    +        assert_matches!(&policy.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &3
                  && m == &2
                  && items.is_empty()
    -            )
             );
             //println!("{}", serde_json::to_string(&policy).unwrap());
     
    @@ -3614,11 +3538,9 @@
                 .extract_policy(&signers_container, build_sat_expired, &secp)
                 .unwrap()
                 .unwrap();
    -        assert!(
    -            matches!(&policy_expired.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &3
    +        assert_matches!(&policy_expired.satisfaction, Satisfaction::Partial { n, m, items, .. } if n == &3
                  && m == &2
                  && items == &vec![0]
    -            )
             );
             //println!("{}", serde_json::to_string(&policy_expired).unwrap());
     
    @@ -3634,11 +3556,9 @@
                 .extract_policy(&signers_container, build_sat_expired_signed, &secp)
                 .unwrap()
                 .unwrap();
    -        assert!(
    -            matches!(&policy_expired_signed.satisfaction, Satisfaction::PartialComplete { n, m, items, .. } if n == &3
    +        assert_matches!(&policy_expired_signed.satisfaction, Satisfaction::PartialComplete { n, m, items, .. } if n == &3
                  && m == &2
                  && items == &vec![0, 1]
    -            )
             );
             //println!("{}", serde_json::to_string(&policy_expired_signed).unwrap());
         }
    @@ -3713,12 +3633,8 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(policy.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2)
    -        );
    -        assert!(
    -            matches!(policy.contribution, Satisfaction::PartialComplete { n: 2, m: 1, items, .. } if items == vec![1])
    -        );
    +        assert_matches!(policy.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2);
    +        assert_matches!(policy.contribution, Satisfaction::PartialComplete { n: 2, m: 1, items, .. } if items == vec![1]);
     
             let alice_sig = SatisfiableItem::SchnorrSignature(PkOrF::Fingerprint(alice_fing));
             let bob_sig = SatisfiableItem::SchnorrSignature(PkOrF::Fingerprint(bob_fing));
    @@ -3810,19 +3726,11 @@
                 .unwrap()
                 .unwrap();
     
    -        assert!(
    -            matches!(policy_unsigned.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2)
    -        );
    -        assert!(
    -            matches!(policy_unsigned.satisfaction, Satisfaction::Partial { n: 2, m: 1, items, .. } if items.is_empty())
    -        );
    +        assert_matches!(policy_unsigned.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2);
    +        assert_matches!(policy_unsigned.satisfaction, Satisfaction::Partial { n: 2, m: 1, items, .. } if items.is_empty());
     
    -        assert!(
    -            matches!(policy_signed.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2)
    -        );
    -        assert!(
    -            matches!(policy_signed.satisfaction, Satisfaction::PartialComplete { n: 2, m: 1, items, .. } if items == vec![0, 1])
    -        );
    +        assert_matches!(policy_signed.item, SatisfiableItem::Thresh { ref items, threshold: 1 } if items.len() == 2);
    +        assert_matches!(policy_signed.satisfaction, Satisfaction::PartialComplete { n: 2, m: 1, items, .. } if items == vec![0, 1]);
     
             let satisfied_items = match policy_signed.item {
                 SatisfiableItem::Thresh { items, .. } => items,
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/template.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/template.rs.html
    index efd38be009..67b3890a9d 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/template.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/descriptor/template.rs.html
    @@ -778,6 +778,7 @@
     777
     778
     779
    +780
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -1263,6 +1264,7 @@
         use super::*;
         use crate::descriptor::{DescriptorError, DescriptorMeta};
         use crate::keys::ValidNetworks;
    +    use assert_matches::assert_matches;
         use bitcoin::network::constants::Network::Regtest;
         use miniscript::descriptor::{DescriptorPublicKey, KeyMap};
         use miniscript::Descriptor;
    @@ -1281,9 +1283,9 @@
             if let ExtendedDescriptor::Pkh(pkh) = xdesc.0 {
                 let path: Vec<ChildNumber> = pkh.into_inner().full_derivation_path().into();
                 let purpose = path.get(0).unwrap();
    -            assert!(matches!(purpose, Hardened { index: 44 }));
    +            assert_matches!(purpose, Hardened { index: 44 });
                 let coin_type = path.get(1).unwrap();
    -            assert!(matches!(coin_type, Hardened { index: 0 }));
    +            assert_matches!(coin_type, Hardened { index: 0 });
             }
     
             let tprvkey = bitcoin::util::bip32::ExtendedPrivKey::from_str("tprv8ZgxMBicQKsPcx5nBGsR63Pe8KnRUqmbJNENAfGftF3yuXoMMoVJJcYeUw5eVkm9WBPjWYt6HMWYJNesB5HaNVBaFc1M6dRjWSYnmewUMYy").unwrap();
    @@ -1295,9 +1297,9 @@
             if let ExtendedDescriptor::Pkh(pkh) = tdesc.0 {
                 let path: Vec<ChildNumber> = pkh.into_inner().full_derivation_path().into();
                 let purpose = path.get(0).unwrap();
    -            assert!(matches!(purpose, Hardened { index: 44 }));
    +            assert_matches!(purpose, Hardened { index: 44 });
                 let coin_type = path.get(1).unwrap();
    -            assert!(matches!(coin_type, Hardened { index: 1 }));
    +            assert_matches!(coin_type, Hardened { index: 1 });
             }
         }
     
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/lib.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/lib.rs.html
    index ccb66ecff8..5c0226ed47 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/lib.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/lib.rs.html
    @@ -284,6 +284,9 @@
     283
     284
     285
    +286
    +287
    +288
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -542,6 +545,9 @@ fn main() -> Result<(), bdk::Error> {
     #[macro_use]
     pub mod testutils;
     
    +#[cfg(test)]
    +extern crate assert_matches;
    +
     #[allow(unused_imports)]
     #[macro_use]
     pub(crate) mod error;
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/coin_selection.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/coin_selection.rs.html
    index 253f37f6b8..56d5d96901 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/coin_selection.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/coin_selection.rs.html
    @@ -1594,11 +1594,6 @@
     1593
     1594
     1595
    -1596
    -1597
    -1598
    -1599
    -1600
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -1703,11 +1698,11 @@
     use bitcoin::consensus::encode::serialize;
     use bitcoin::Script;
     
    +#[cfg(test)]
    +use assert_matches::assert_matches;
     use rand::seq::SliceRandom;
     #[cfg(not(test))]
     use rand::thread_rng;
    -#[cfg(test)]
    -use rand::{rngs::StdRng, SeedableRng};
     use std::collections::HashMap;
     use std::convert::TryInto;
     
    @@ -2272,6 +2267,7 @@
             optional_utxos.shuffle(&mut thread_rng());
             #[cfg(test)]
             {
    +            use rand::{rngs::StdRng, SeedableRng};
                 let seed = [0; 32];
                 let mut rng: StdRng = SeedableRng::from_seed(seed);
                 optional_utxos.shuffle(&mut rng);
    @@ -3123,24 +3119,22 @@
             let database = MemoryDatabase::default();
             let drain_script = Script::default();
     
    -        let err = BranchAndBoundCoinSelection::default()
    -            .coin_select(
    -                &database,
    -                vec![],
    -                utxos,
    -                FeeRate::from_sat_per_vb(10.0),
    -                500_000,
    -                &drain_script,
    -            )
    -            .unwrap_err();
    +        let selection = BranchAndBoundCoinSelection::default().coin_select(
    +            &database,
    +            vec![],
    +            utxos,
    +            FeeRate::from_sat_per_vb(10.0),
    +            500_000,
    +            &drain_script,
    +        );
     
    -        assert!(matches!(
    -            err,
    -            Error::InsufficientFunds {
    +        assert_matches!(
    +            selection,
    +            Err(Error::InsufficientFunds {
                     available: 300_000,
                     ..
    -            }
    -        ));
    +            })
    +        );
         }
     
         #[test]
    @@ -3153,24 +3147,22 @@
                 .into_iter()
                 .partition(|u| matches!(u, WeightedUtxo { utxo, .. } if utxo.txout().value < 1000));
     
    -        let err = BranchAndBoundCoinSelection::default()
    -            .coin_select(
    -                &database,
    -                required,
    -                optional,
    -                FeeRate::from_sat_per_vb(10.0),
    -                500_000,
    -                &drain_script,
    -            )
    -            .unwrap_err();
    +        let selection = BranchAndBoundCoinSelection::default().coin_select(
    +            &database,
    +            required,
    +            optional,
    +            FeeRate::from_sat_per_vb(10.0),
    +            500_000,
    +            &drain_script,
    +        );
     
    -        assert!(matches!(
    -            err,
    -            Error::InsufficientFunds {
    +        assert_matches!(
    +            selection,
    +            Err(Error::InsufficientFunds {
                     available: 300_010,
                     ..
    -            }
    -        ));
    +            })
    +        );
         }
     
         #[test]
    @@ -3179,24 +3171,22 @@
             let database = MemoryDatabase::default();
             let drain_script = Script::default();
     
    -        let err = BranchAndBoundCoinSelection::default()
    -            .coin_select(
    -                &database,
    -                utxos,
    -                vec![],
    -                FeeRate::from_sat_per_vb(10_000.0),
    -                500_000,
    -                &drain_script,
    -            )
    -            .unwrap_err();
    +        let selection = BranchAndBoundCoinSelection::default().coin_select(
    +            &database,
    +            utxos,
    +            vec![],
    +            FeeRate::from_sat_per_vb(10_000.0),
    +            500_000,
    +            &drain_script,
    +        );
     
    -        assert!(matches!(
    -            err,
    -            Error::InsufficientFunds {
    +        assert_matches!(
    +            selection,
    +            Err(Error::InsufficientFunds {
                     available: 300_010,
                     ..
    -            }
    -        ));
    +            })
    +        );
         }
     }
     
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html index 49659fc569..0d75729808 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/mod.rs.html @@ -5573,20 +5573,6 @@ 5572 5573 5574 -5575 -5576 -5577 -5578 -5579 -5580 -5581 -5582 -5583 -5584 -5585 -5586 -5587 -5588
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -7440,6 +7426,7 @@
     
     #[cfg(test)]
     pub(crate) mod test {
    +    use assert_matches::assert_matches;
         use bitcoin::{util::psbt, Network, PackedLockTime, Sequence};
     
         use crate::database::Database;
    @@ -10014,11 +10001,9 @@
                 result.is_err(),
                 "Signing should have failed because the TX uses non-standard sighashes"
             );
    -        assert!(
    -            matches!(
    -                result.unwrap_err(),
    -                Error::Signer(SignerError::NonStandardSighash)
    -            ),
    +        assert_matches!(
    +            result,
    +            Err(Error::Signer(SignerError::NonStandardSighash)),
                 "Signing failed with the wrong error type"
             );
     
    @@ -10501,16 +10486,10 @@
                     ..Default::default()
                 },
             );
    -        assert!(
    -            result.is_err(),
    -            "Signing should have failed because the witness_utxo is missing"
    -        );
    -        assert!(
    -            matches!(
    -                result.unwrap_err(),
    -                Error::Signer(SignerError::MissingWitnessUtxo)
    -            ),
    -            "Signing failed with the wrong error type"
    +        assert_matches!(
    +            result,
    +            Err(Error::Signer(SignerError::MissingWitnessUtxo)),
    +            "Signing should have failed with the correct error because the witness_utxo is missing"
             );
     
             // restore the witness_utxo
    @@ -10524,9 +10503,9 @@
                 },
             );
     
    -        assert!(result.is_ok(), "Signing should have worked");
    -        assert!(
    -            result.unwrap(),
    +        assert_matches!(
    +            result,
    +            Ok(true),
                 "Should finalize the input since we can produce signatures"
             );
         }
    @@ -10851,11 +10830,9 @@
                 result.is_err(),
                 "Signing should have failed because the TX uses non-standard sighashes"
             );
    -        assert!(
    -            matches!(
    -                result.unwrap_err(),
    -                Error::Signer(SignerError::NonStandardSighash)
    -            ),
    +        assert_matches!(
    +            result,
    +            Err(Error::Signer(SignerError::NonStandardSighash)),
                 "Signing failed with the wrong error type"
             );
     
    @@ -10871,11 +10848,9 @@
                 result.is_err(),
                 "Signing should have failed because the witness_utxo is missing"
             );
    -        assert!(
    -            matches!(
    -                result.unwrap_err(),
    -                Error::Signer(SignerError::MissingWitnessUtxo)
    -            ),
    +        assert_matches!(
    +            result,
    +            Err(Error::Signer(SignerError::MissingWitnessUtxo)),
                 "Signing failed with the wrong error type"
             );
     
    @@ -10956,26 +10931,26 @@
             builder
                 .add_recipient(addr.script_pubkey(), balance.immature / 2)
                 .current_height(confirmation_time);
    -        assert!(matches!(
    -            builder.finish().unwrap_err(),
    -            Error::InsufficientFunds {
    +        assert_matches!(
    +            builder.finish(),
    +            Err(Error::InsufficientFunds {
                     needed: _,
                     available: 0
    -            }
    -        ));
    +            })
    +        );
     
             // Still unspendable...
             let mut builder = wallet.build_tx();
             builder
                 .add_recipient(addr.script_pubkey(), balance.immature / 2)
                 .current_height(not_yet_mature_time);
    -        assert!(matches!(
    -            builder.finish().unwrap_err(),
    -            Error::InsufficientFunds {
    +        assert_matches!(
    +            builder.finish(),
    +            Err(Error::InsufficientFunds {
                     needed: _,
                     available: 0
    -            }
    -        ));
    +            })
    +        );
     
             // ...Now the coinbase is mature :)
             let sync_time = SyncTime {
    @@ -11017,10 +10992,7 @@
     
             builder.add_recipient(addr.script_pubkey(), 0);
     
    -        assert!(matches!(
    -            builder.finish().unwrap_err(),
    -            Error::OutputBelowDustLimit(0)
    -        ));
    +        assert_matches!(builder.finish(), Err(Error::OutputBelowDustLimit(0)));
     
             let mut builder = wallet.build_tx();
     
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html
    index 0e12a977d9..b1aa92c675 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/signer.rs.html
    @@ -1122,6 +1122,7 @@
     1121
     1122
     1123
    +1124
     
    // Bitcoin Dev Kit
     // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -2122,6 +2123,7 @@
         use crate::descriptor;
         use crate::descriptor::IntoWalletDescriptor;
         use crate::keys::{DescriptorKey, IntoDescriptorKey};
    +    use assert_matches::assert_matches;
         use bitcoin::secp256k1::{All, Secp256k1};
         use bitcoin::util::bip32;
         use bitcoin::Network;
    @@ -2191,17 +2193,17 @@
             signers.add_external(id2.clone(), SignerOrdering(2), signer2.clone());
             signers.add_external(id3.clone(), SignerOrdering(3), signer3.clone());
     
    -        assert!(matches!(signers.find(id1), Some(signer) if is_equal(signer, &signer1)));
    -        assert!(matches!(signers.find(id2), Some(signer) if is_equal(signer, &signer2)));
    -        assert!(matches!(signers.find(id3.clone()), Some(signer) if is_equal(signer, &signer3)));
    +        assert_matches!(signers.find(id1), Some(signer) if is_equal(signer, &signer1));
    +        assert_matches!(signers.find(id2), Some(signer) if is_equal(signer, &signer2));
    +        assert_matches!(signers.find(id3.clone()), Some(signer) if is_equal(signer, &signer3));
     
             // The `signer4` has the same ID as `signer3` but lower ordering.
             // It should be found by `id3` instead of `signer3`.
             signers.add_external(id3.clone(), SignerOrdering(2), signer4.clone());
    -        assert!(matches!(signers.find(id3), Some(signer) if is_equal(signer, &signer4)));
    +        assert_matches!(signers.find(id3), Some(signer) if is_equal(signer, &signer4));
     
             // Can't find anything with ID that doesn't exist
    -        assert!(matches!(signers.find(id_nonexistent), None));
    +        assert_matches!(signers.find(id_nonexistent), None);
         }
     
         #[derive(Debug, Clone, Copy)]
    diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/verify.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/verify.rs.html
    index 95731792b9..7d449ef87c 100644
    --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/verify.rs.html
    +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/wallet/verify.rs.html
    @@ -160,7 +160,6 @@
     159
     160
     161
    -162
     
    // Bitcoin Dev Kit
     // Written in 2021 by Alekos Filini <alekos.filini@gmail.com>
     //
    @@ -271,6 +270,7 @@
     mod test {
         use super::*;
         use crate::database::{BatchOperations, MemoryDatabase};
    +    use assert_matches::assert_matches;
         use bitcoin::consensus::encode::deserialize;
         use bitcoin::hashes::hex::FromHex;
         use bitcoin::{Transaction, Txid};
    @@ -300,9 +300,7 @@
             }
     
             let result = verify_tx(&signed_tx, &database, &blockchain);
    -        assert!(result.is_err(), "Should fail with missing input tx");
    -        assert!(
    -            matches!(result, Err(VerifyError::MissingInputTx(txid)) if txid == prev_tx.txid()),
    +        assert_matches!(result, Err(VerifyError::MissingInputTx(txid)) if txid == prev_tx.txid(),
                 "Error should be a `MissingInputTx` error"
             );
     
    @@ -310,9 +308,9 @@
             database.set_raw_tx(&prev_tx).unwrap();
     
             let result = verify_tx(&unsigned_tx, &database, &blockchain);
    -        assert!(result.is_err(), "Should fail since the TX is unsigned");
    -        assert!(
    -            matches!(result, Err(VerifyError::Consensus(_))),
    +        assert_matches!(
    +            result,
    +            Err(VerifyError::Consensus(_)),
                 "Error should be a `Consensus` error"
             );