From f5074ee3aee319137db1ddfa1e99f7e111abcfd4 Mon Sep 17 00:00:00 2001 From: Vladimir Fomene Date: Fri, 14 Jul 2023 17:52:08 +0300 Subject: [PATCH] remove duplicate `is_empty` from DerivationAdditions --- crates/chain/src/keychain.rs | 6 +----- crates/chain/tests/test_keychain_txout_index.rs | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/chain/src/keychain.rs b/crates/chain/src/keychain.rs index f9b2436f2..2362c2c42 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 5f586584c..a92e74486 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};