Merge bitcoindevkit/bdk#1031: remove duplicate is_empty
f5074ee3aee319137db1ddfa1e99f7e111abcfd4 remove duplicate `is_empty` from DerivationAdditions (Vladimir Fomene) Pull request description: Duplicate `is_empty` method ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: danielabrozzoni: ACK f5074ee3aee319137db1ddfa1e99f7e111abcfd4 Tree-SHA512: 1cb48d25c9e57dbe444646ebc33c838e3d58c2523d74b58a75f0d085f68d070ec6a644c46e0bccb8765af7167c8359f079a6222fc9d17ae28ce1e6dda820fc84
This commit is contained in:
commit
cb626e9fc8
@ -46,11 +46,6 @@ pub use txout_index::*;
|
||||
pub struct DerivationAdditions<K>(pub BTreeMap<K, u32>);
|
||||
|
||||
impl<K> DerivationAdditions<K> {
|
||||
/// 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<K, u32> {
|
||||
&self.0
|
||||
@ -72,6 +67,7 @@ impl<K: Ord> Append for DerivationAdditions<K> {
|
||||
self.0.append(&mut other.0);
|
||||
}
|
||||
|
||||
/// Returns whether the additions are empty.
|
||||
fn is_empty(&self) -> bool {
|
||||
self.0.is_empty()
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ mod common;
|
||||
use bdk_chain::{
|
||||
collections::BTreeMap,
|
||||
keychain::{DerivationAdditions, KeychainTxOutIndex},
|
||||
Append,
|
||||
};
|
||||
|
||||
use bitcoin::{secp256k1::Secp256k1, OutPoint, Script, Transaction, TxOut};
|
||||
|
Loading…
x
Reference in New Issue
Block a user