Skip to content

Commit 4b8b17d

Browse files
committed
Reduce visibility for offer auxiliary types
1 parent 087c0bd commit 4b8b17d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lightning/src/offers/offer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub struct Offer {
242242

243243
/// The contents of an [`Offer`], which may be shared with an `InvoiceRequest` or an `Invoice`.
244244
#[derive(Clone, Debug)]
245-
pub(crate) struct OfferContents {
245+
pub(super) struct OfferContents {
246246
chains: Option<Vec<ChainHash>>,
247247
metadata: Option<Vec<u8>>,
248248
amount: Option<Amount>,

lightning/src/offers/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::util::ser::SeekReadable;
2020
use crate::prelude::*;
2121

2222
/// Indicates a message can be encoded using bech32.
23-
pub(crate) trait Bech32Encode: AsRef<[u8]> + TryFrom<Vec<u8>, Error=ParseError> {
23+
pub(super) trait Bech32Encode: AsRef<[u8]> + TryFrom<Vec<u8>, Error=ParseError> {
2424
/// Human readable part of the message's bech32 encoding.
2525
const BECH32_HRP: &'static str;
2626

@@ -78,7 +78,7 @@ impl<'a> AsRef<str> for Bech32String<'a> {
7878

7979
/// A wrapper for reading a message as a TLV stream `T` from a byte sequence, while still
8080
/// maintaining ownership of the bytes for later use.
81-
pub(crate) struct ParsedMessage<T: SeekReadable> {
81+
pub(super) struct ParsedMessage<T: SeekReadable> {
8282
pub bytes: Vec<u8>,
8383
pub tlv_stream: T,
8484
}

lightning/src/util/ser_macros.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,15 +504,15 @@ macro_rules! tlv_stream {
504504
$(($type:expr, $field:ident : $fieldty:tt)),* $(,)*
505505
}) => {
506506
#[derive(Debug)]
507-
pub(crate) struct $name {
507+
pub(super) struct $name {
508508
$(
509509
$field: Option<tlv_record_type!($fieldty)>,
510510
)*
511511
}
512512

513-
pub(crate) struct $nameref<'a> {
513+
pub(super) struct $nameref<'a> {
514514
$(
515-
pub(crate) $field: Option<tlv_record_ref_type!($fieldty)>,
515+
pub(super) $field: Option<tlv_record_ref_type!($fieldty)>,
516516
)*
517517
}
518518

0 commit comments

Comments
 (0)