units: Re-export all the public amount error types
What changed, and why it matters
This change is purely about making more error types publicly visible from a Rust library module. It does not alter how errors are handled, what data they contain, or any runtime behavior. There is no security issue here.
No action needed; this is a benign API refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors public re-exports in units/src/amount/mod.rs. Previously several amount parsing error types were only used internally; now they are re-exported publicly via pub use self::error::{…}. This is an API visibility change with no functional or security implications.
Changed components
units/src/amount/mod.rsInspect captured patch +6 / −6
diff --git a/units/src/amount/mod.rs b/units/src/amount/mod.rs
index fe2064e8..dfa04db4 100644
--- a/units/src/amount/mod.rs
+++ b/units/src/amount/mod.rs
@@ -25,11 +25,7 @@ use core::str::FromStr;
#[cfg(feature = "arbitrary")]
use arbitrary::{Arbitrary, Unstructured};
-use self::error::{
- BadPositionError, InputTooLargeError, InvalidCharacterError, MissingDenominationError,
- MissingDigitsError, MissingDigitsKind, ParseAmountErrorInner, ParseErrorInner,
- PossiblyConfusingDenominationError, TooPreciseError, UnknownDenominationError,
-};
+use self::error::{MissingDigitsKind, ParseAmountErrorInner, ParseErrorInner};
#[rustfmt::skip] // Keep public re-exports separate.
#[doc(inline)]
@@ -41,7 +37,11 @@ pub use self::{
#[doc(no_inline)]
pub use self::error::AmountDecoderError;
#[doc(no_inline)]
-pub use self::error::{OutOfRangeError, ParseAmountError, ParseDenominationError, ParseError};
+pub use self::error::{
+ BadPositionError, InputTooLargeError, InvalidCharacterError, MissingDenominationError,
+ MissingDigitsError, OutOfRangeError, ParseAmountError, ParseDenominationError, ParseError,
+ PossiblyConfusingDenominationError, TooPreciseError, UnknownDenominationError,
+};
#[doc(inline)]
#[cfg(feature = "encoding")]
pub use self::unsigned::{AmountDecoder, AmountEncoder};
Why this scored 16/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.