Re-export P2shError

The `address` module is currently publicly re-exporting all error types
that appear as return values for any pubic function, except for the
`P2shError` - we should be uniform.

This re-export of error thing has not been discussed/agreed upon as a
policy but I have been doing it for the last few months anytime I
introduced an `error` module - there has been no push back so I assumed
it was acceptable. Before 1.0 we should probably have a policy on this.
This commit is contained in:
Tobin C. Harding 2024-02-29 09:44:50 +11:00
parent 646ee1a837
commit 0d517dcfdd
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 2 deletions

View File

@ -50,11 +50,10 @@ use crate::network::{Network, NetworkKind};
use crate::prelude::*;
use crate::taproot::TapNodeHash;
use self::error::P2shError;
#[rustfmt::skip] // Keep public re-exports separate.
#[doc(inline)]
pub use self::{
error::{FromScriptError, NetworkValidationError, ParseError, UnknownAddressTypeError, UnknownHrpError},
error::{FromScriptError, NetworkValidationError, ParseError, P2shError, UnknownAddressTypeError, UnknownHrpError},
};
/// The different types of addresses.