From ad75d5181f52f604c68c802313eb0f87fa049642 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Tue, 4 Jan 2022 13:23:40 +1100 Subject: [PATCH] Make Map trait private to psbt module The `Map` trait has been deemed confusing and not that useful to users of the library, we still use it internally within the `psbt` module though so make it visible only in `psbt` and `psbt::map`. --- src/util/psbt/map/mod.rs | 2 +- src/util/psbt/mod.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/psbt/map/mod.rs b/src/util/psbt/map/mod.rs index ee323926..21f07299 100644 --- a/src/util/psbt/map/mod.rs +++ b/src/util/psbt/map/mod.rs @@ -28,7 +28,7 @@ pub use self::input::{Input, PsbtSigHashType}; pub use self::output::{Output, TapTree}; /// A trait that describes a PSBT key-value map. -pub trait Map { +pub(super) trait Map { /// Attempt to insert a key-value pair. fn insert_pair(&mut self, pair: raw::Pair) -> Result<(), encode::Error>; diff --git a/src/util/psbt/mod.rs b/src/util/psbt/mod.rs index 4dd3e8d2..97cf011f 100644 --- a/src/util/psbt/mod.rs +++ b/src/util/psbt/mod.rs @@ -39,7 +39,8 @@ mod macros; pub mod serialize; mod map; -pub use self::map::{Map, Input, Output, TapTree}; +pub use self::map::{Input, Output, TapTree}; +use self::map::Map; use util::bip32::{ExtendedPubKey, KeySource};