From: Matt Corallo Date: Fri, 30 Apr 2021 04:19:51 +0000 (+0000) Subject: Use explicit import lists instead of glob imports in invoice X-Git-Tag: v0.0.14~3^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=aed4665d4403013d6b0e09fcd300983d85b2a8f8;hp=2242b621fd5528346d6637fc49668c25d2f44c5f;p=rust-lightning 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. --- diff --git a/lightning-invoice/src/de.rs b/lightning-invoice/src/de.rs index 4b38c89e..3610bc4b 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 8f0ff31b..6bc60d96 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`