units: Make amount::error module private
The `untis::error` module is just a code organisation thing it should never have been public. We already re-export all the error types and this is verified by the `units/tests/api.rs` test file. Make the module private and remove it from the paths in the `api` test.
This commit is contained in:
parent
35f1e8641f
commit
760f0715dd
|
@ -5,7 +5,7 @@
|
|||
//! This module mainly introduces the [`Amount`] and [`SignedAmount`] types.
|
||||
//! We refer to the documentation on the types for more information.
|
||||
|
||||
pub mod error;
|
||||
mod error;
|
||||
#[cfg(feature = "serde")]
|
||||
pub mod serde;
|
||||
|
||||
|
|
|
@ -124,17 +124,17 @@ struct Errors {
|
|||
i: amount::PossiblyConfusingDenominationError,
|
||||
j: amount::TooPreciseError,
|
||||
k: amount::UnknownDenominationError,
|
||||
l: amount::error::InputTooLargeError,
|
||||
m: amount::error::InvalidCharacterError,
|
||||
n: amount::error::MissingDenominationError,
|
||||
o: amount::error::MissingDigitsError,
|
||||
p: amount::error::OutOfRangeError,
|
||||
q: amount::error::ParseAmountError,
|
||||
r: amount::error::ParseDenominationError,
|
||||
s: amount::error::ParseError,
|
||||
t: amount::error::PossiblyConfusingDenominationError,
|
||||
u: amount::error::TooPreciseError,
|
||||
v: amount::error::UnknownDenominationError,
|
||||
l: amount::InputTooLargeError,
|
||||
m: amount::InvalidCharacterError,
|
||||
n: amount::MissingDenominationError,
|
||||
o: amount::MissingDigitsError,
|
||||
p: amount::OutOfRangeError,
|
||||
q: amount::ParseAmountError,
|
||||
r: amount::ParseDenominationError,
|
||||
s: amount::ParseError,
|
||||
t: amount::PossiblyConfusingDenominationError,
|
||||
u: amount::TooPreciseError,
|
||||
v: amount::UnknownDenominationError,
|
||||
w: block::TooBigForRelativeBlockHeightError,
|
||||
x: locktime::absolute::ConversionError,
|
||||
y: locktime::absolute::Height,
|
||||
|
@ -166,15 +166,6 @@ fn api_can_use_all_types_from_module_amount() {
|
|||
};
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn api_can_use_all_types_from_module_amount_error() {
|
||||
use bitcoin_units::amount::error::{
|
||||
InputTooLargeError, InvalidCharacterError, MissingDenominationError, MissingDigitsError,
|
||||
OutOfRangeError, ParseAmountError, ParseDenominationError, ParseError,
|
||||
PossiblyConfusingDenominationError, TooPreciseError, UnknownDenominationError,
|
||||
};
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn api_can_use_all_types_from_module_block() {
|
||||
use bitcoin_units::block::{BlockHeight, BlockInterval, TooBigForRelativeBlockHeightError};
|
||||
|
|
Loading…
Reference in New Issue