From 4b8b17d72f9928220f44820247027ec497e79062 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Fri, 2 Dec 2022 15:26:27 -0800 Subject: [PATCH] Reduce visibility for offer auxiliary types --- lightning/src/offers/offer.rs | 2 +- lightning/src/offers/parse.rs | 4 ++-- lightning/src/util/ser_macros.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 704045f76..5995c513d 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -242,7 +242,7 @@ pub struct Offer { /// The contents of an [`Offer`], which may be shared with an `InvoiceRequest` or an `Invoice`. #[derive(Clone, Debug)] -pub(crate) struct OfferContents { +pub(super) struct OfferContents { chains: Option>, metadata: Option>, amount: Option, diff --git a/lightning/src/offers/parse.rs b/lightning/src/offers/parse.rs index 19d7d74ed..013970981 100644 --- a/lightning/src/offers/parse.rs +++ b/lightning/src/offers/parse.rs @@ -20,7 +20,7 @@ use crate::util::ser::SeekReadable; use crate::prelude::*; /// Indicates a message can be encoded using bech32. -pub(crate) trait Bech32Encode: AsRef<[u8]> + TryFrom, Error=ParseError> { +pub(super) trait Bech32Encode: AsRef<[u8]> + TryFrom, Error=ParseError> { /// Human readable part of the message's bech32 encoding. const BECH32_HRP: &'static str; @@ -78,7 +78,7 @@ impl<'a> AsRef for Bech32String<'a> { /// A wrapper for reading a message as a TLV stream `T` from a byte sequence, while still /// maintaining ownership of the bytes for later use. -pub(crate) struct ParsedMessage { +pub(super) struct ParsedMessage { pub bytes: Vec, pub tlv_stream: T, } diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs index 3e1d8a928..6cc9d9477 100644 --- a/lightning/src/util/ser_macros.rs +++ b/lightning/src/util/ser_macros.rs @@ -504,15 +504,15 @@ macro_rules! tlv_stream { $(($type:expr, $field:ident : $fieldty:tt)),* $(,)* }) => { #[derive(Debug)] - pub(crate) struct $name { + pub(super) struct $name { $( $field: Option, )* } - pub(crate) struct $nameref<'a> { + pub(super) struct $nameref<'a> { $( - pub(crate) $field: Option, + pub(super) $field: Option, )* } -- 2.39.5