diff --git a/lightning-invoice/src/de.rs b/lightning-invoice/src/de.rs index 4b38c89ec94..3610bc4b67f 100644 --- a/lightning-invoice/src/de.rs +++ b/lightning-invoice/src/de.rs @@ -20,7 +20,9 @@ use secp256k1; use secp256k1::recovery::{RecoveryId, RecoverableSignature}; use secp256k1::key::PublicKey; -use super::*; +use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp, + SemanticError, RouteHint, Description, RawTaggedField, Currency, RawHrp, SiPrefix, RawInvoice, constants, SignedRawInvoice, + RawDataPart, CreationError, InvoiceFeatures}; use self::hrp_sm::parse_hrp; diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index 461ae9b92ad..cc6049f0360 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -332,6 +332,8 @@ pub enum Currency { } /// Tagged field which may have an unknown tag +/// +/// (C-not exported) as we don't currently support TaggedField #[derive(Eq, PartialEq, Debug, Clone)] pub enum RawTaggedField { /// Parsed tagged field with known tag @@ -343,6 +345,9 @@ pub enum RawTaggedField { /// Tagged field with known tag /// /// For descriptions of the enum values please refer to the enclosed type's docs. +/// +/// (C-not exported) As we don't yet support enum variants with the same name the struct contained +/// in the variant. #[allow(missing_docs)] #[derive(Eq, PartialEq, Debug, Clone)] pub enum TaggedField { @@ -1322,10 +1327,8 @@ impl std::error::Error for SemanticError { } /// When signing using a fallible method either an user-supplied `SignError` or a `CreationError` /// may occur. -/// -/// (C-not exported) As we don't support unbounded generics #[derive(Eq, PartialEq, Debug, Clone)] -pub enum SignOrCreationError { +pub enum SignOrCreationError { /// An error occurred during signing SignError(S), diff --git a/lightning-invoice/src/ser.rs b/lightning-invoice/src/ser.rs index 8f0ff31b904..88119267823 100644 --- a/lightning-invoice/src/ser.rs +++ b/lightning-invoice/src/ser.rs @@ -2,7 +2,8 @@ use std::fmt; use std::fmt::{Display, Formatter}; use bech32::{ToBase32, u5, WriteBase32, Base32Len}; -use ::*; +use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp, + RouteHint, Description, RawTaggedField, Currency, RawHrp, SiPrefix, constants, SignedRawInvoice, RawDataPart}; /// Converts a stream of bytes written to it to base32. On finalization the according padding will /// be applied. That means the results of writing two data blocks with one or two `BytesToBase32` @@ -122,6 +123,7 @@ impl Display for SignedRawInvoice { } } +/// (C-not exported) impl Display for RawHrp { fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { let amount = match self.raw_amount {