From aed4665d4403013d6b0e09fcd300983d85b2a8f8 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 30 Apr 2021 04:19:51 +0000 Subject: [PATCH] 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. --- lightning-invoice/src/de.rs | 4 +++- lightning-invoice/src/ser.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lightning-invoice/src/de.rs b/lightning-invoice/src/de.rs index 4b38c89ec..3610bc4b6 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/ser.rs b/lightning-invoice/src/ser.rs index 8f0ff31b9..6bc60d960 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` -- 2.39.5