X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fser_macros.rs;h=dce160a7c5eecd5325ef30b9a219f8a067bf5fce;hb=fb3a86f498f971dc01fdd58b166031793ff1bc1a;hp=782e786ff843eb08f5b5e0146decc9e8b1138af5;hpb=a0183d7ef1bdf95eb009b1c85849585e3faa0217;p=rust-lightning diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs index 782e786f..dce160a7 100644 --- a/lightning/src/util/ser_macros.rs +++ b/lightning/src/util/ser_macros.rs @@ -917,7 +917,7 @@ macro_rules! tlv_stream { #[cfg_attr(test, derive(PartialEq))] #[derive(Debug)] - pub(super) struct $nameref<'a> { + pub(crate) struct $nameref<'a> { $( pub(super) $field: Option, )* @@ -1033,7 +1033,7 @@ macro_rules! impl_writeable_tlv_based_enum { $($variant_id => { // Because read_tlv_fields creates a labeled loop, we cannot call it twice // in the same function body. Instead, we define a closure and call it. - let f = || { + let mut f = || { $crate::_init_and_read_len_prefixed_tlv_fields!(reader, { $(($type, $field, $fieldty)),* }); @@ -1087,7 +1087,7 @@ macro_rules! impl_writeable_tlv_based_enum_upgradable { $($variant_id => { // Because read_tlv_fields creates a labeled loop, we cannot call it twice // in the same function body. Instead, we define a closure and call it. - let f = || { + let mut f = || { $crate::_init_and_read_len_prefixed_tlv_fields!(reader, { $(($type, $field, $fieldty)),* });