Mark `CheckedHrpstringError` instances as no-export
What changed, and why it matters
This commit only adds documentation comments to two Rust error types explaining that an internal error detail is intentionally not exposed to language bindings users. There are no code behavior changes, no bug fixes, and no security implications.
No action required; this is a non-functional documentation change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds rustdoc comments (‘/// This is not exported to bindings users as the details don’t matter much’) to the CheckedHrpstringError variant fields inside Bolt11ParseError::Bech32Error and Bolt12ParseError::Bech32. No types, visibility, logic, or API behavior are changed. It is a documentation-only annotation for bindings generation tooling.
Changed components
lightning-invoice/src/lib.rslightning/src/offers/parse.rsInspect captured patch +8 / −2
diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs
index 3634d67..47f9293 100644
--- a/lightning-invoice/src/lib.rs
+++ b/lightning-invoice/src/lib.rs
@@ -91,7 +91,10 @@ use crate::ser::Base32Iterable;
#[allow(missing_docs)]
#[derive(PartialEq, Eq, Debug, Clone)]
pub enum Bolt11ParseError {
- Bech32Error(CheckedHrpstringError),
+ Bech32Error(
+ /// This is not exported to bindings users as the details don't matter much
+ CheckedHrpstringError,
+ ),
ParseAmountError(ParseIntError),
MalformedSignature(bitcoin::secp256k1::Error),
BadPrefix,
diff --git a/lightning/src/offers/parse.rs b/lightning/src/offers/parse.rs
index 8e8d01b..99dd1bb 100644
--- a/lightning/src/offers/parse.rs
+++ b/lightning/src/offers/parse.rs
@@ -142,7 +142,10 @@ pub enum Bolt12ParseError {
/// being parsed.
InvalidBech32Hrp,
/// The string could not be bech32 decoded.
- Bech32(CheckedHrpstringError),
+ Bech32(
+ /// This is not exported to bindings users as the details don't matter much
+ CheckedHrpstringError,
+ ),
/// The bech32 decoded string could not be decoded as the expected message type.
Decode(DecodeError),
/// The parsed message has invalid semantics.
Why this scored 15/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.