Skip to content

Commit aed4665

Browse files
committed
Use explicit import lists instead of glob imports in invoice
While this is less readable, I spent way too long trying to adapt the bindings generation code to handle glob imports and concluded it would take refactoring almost the entire import-resolution logic. While this may be a good refactor to do eventually, its probably not worth it today.
1 parent 2242b62 commit aed4665

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lightning-invoice/src/de.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ use secp256k1;
2020
use secp256k1::recovery::{RecoveryId, RecoverableSignature};
2121
use secp256k1::key::PublicKey;
2222

23-
use super::*;
23+
use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp,
24+
SemanticError, RouteHint, Description, RawTaggedField, Currency, RawHrp, SiPrefix, RawInvoice, constants, SignedRawInvoice,
25+
RawDataPart, CreationError, InvoiceFeatures};
2426

2527
use self::hrp_sm::parse_hrp;
2628

lightning-invoice/src/ser.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ use std::fmt;
22
use std::fmt::{Display, Formatter};
33
use bech32::{ToBase32, u5, WriteBase32, Base32Len};
44

5-
use ::*;
5+
use super::{Invoice, Sha256, TaggedField, ExpiryTime, MinFinalCltvExpiry, Fallback, PayeePubKey, InvoiceSignature, PositiveTimestamp,
6+
RouteHint, Description, RawTaggedField, Currency, RawHrp, SiPrefix, constants, SignedRawInvoice, RawDataPart};
67

78
/// Converts a stream of bytes written to it to base32. On finalization the according padding will
89
/// be applied. That means the results of writing two data blocks with one or two `BytesToBase32`

0 commit comments

Comments
 (0)