units: Fix error re-exports

Currently we re-export two error types at the crate root, this is
surprising because:

- Why not none or all the rest?
- Why these two?

Observe that the `ParseIntError` is special in that it is used by
other modules so its good to have at the crate root (other errors are
expected to be used with a module prefix eg, `amount::ParseError`).

There is no obvious reason why `ParseAmountError` is re-exported.

Comment and doc inline the `ParesIntError`, remove the re-export of
the `ParseAmountError`.
This commit is contained in:
Tobin C. Harding 2024-05-08 11:43:29 +10:00
parent 2e8bd5f06a
commit d242125ae4
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 2 additions and 1 deletions

View File

@ -45,10 +45,11 @@ pub mod parse;
#[cfg(feature = "alloc")]
pub mod weight;
pub use self::amount::ParseAmountError;
#[doc(inline)]
pub use self::amount::{Amount, SignedAmount};
// ParseIntError is used by other modules, so we re-export it.
#[cfg(feature = "alloc")]
#[doc(inline)]
pub use self::parse::ParseIntError;
#[cfg(feature = "alloc")]
#[doc(inline)]