Use explicit import lists instead of glob imports in invoice
authorMatt Corallo <git@bluematt.me>
Fri, 30 Apr 2021 04:19:51 +0000 (04:19 +0000)
committerMatt Corallo <git@bluematt.me>
Sat, 1 May 2021 00:36:58 +0000 (00:36 +0000)
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.

lightning-invoice/src/de.rs
lightning-invoice/src/ser.rs

index 4b38c89ec9444932daac0f224567dae1e749282b..3610bc4b67fab01f11283aed957c1fe71ccb4731 100644 (file)
@@ -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;
 
index 8f0ff31b904b78b42f4708ea3af8c4b7fd099a04..6bc60d960ba437545f721d9437f765df36a108fe 100644 (file)
@@ -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`