From: Vladimir Fomene Date: Fri, 14 Jul 2023 14:52:08 +0000 (+0300) Subject: remove duplicate `is_empty` from DerivationAdditions X-Git-Tag: v1.0.0-alpha.2~32^2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/struct.CommandStringError.html?a=commitdiff_plain;h=f5074ee3aee319137db1ddfa1e99f7e111abcfd4;p=bdk remove duplicate `is_empty` from DerivationAdditions --- diff --git a/crates/chain/src/keychain.rs b/crates/chain/src/keychain.rs index f9b2436f..2362c2c4 100644 --- a/crates/chain/src/keychain.rs +++ b/crates/chain/src/keychain.rs @@ -46,11 +46,6 @@ pub use txout_index::*; pub struct DerivationAdditions(pub BTreeMap); impl DerivationAdditions { - /// Returns whether the additions are empty. - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } - /// Get the inner map of the keychain to its new derivation index. pub fn as_inner(&self) -> &BTreeMap { &self.0 @@ -72,6 +67,7 @@ impl Append for DerivationAdditions { self.0.append(&mut other.0); } + /// Returns whether the additions are empty. fn is_empty(&self) -> bool { self.0.is_empty() } diff --git a/crates/chain/tests/test_keychain_txout_index.rs b/crates/chain/tests/test_keychain_txout_index.rs index 5f586584..a92e7448 100644 --- a/crates/chain/tests/test_keychain_txout_index.rs +++ b/crates/chain/tests/test_keychain_txout_index.rs @@ -5,6 +5,7 @@ mod common; use bdk_chain::{ collections::BTreeMap, keychain::{DerivationAdditions, KeychainTxOutIndex}, + Append, }; use bitcoin::{secp256k1::Secp256k1, OutPoint, Script, Transaction, TxOut};