From: Jeffrey Czyz Date: Fri, 2 Dec 2022 23:26:27 +0000 (-0800) Subject: Reduce visibility for offer auxiliary types X-Git-Tag: v0.0.113~8^2~9 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4b8b17d72f9928220f44820247027ec497e79062;p=rust-lightning Reduce visibility for offer auxiliary types --- diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 704045f7..5995c513 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 19d7d74e..01397098 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 3e1d8a92..6cc9d947 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, )* }