We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f827341 commit 61954f9Copy full SHA for 61954f9
lightning/src/util/ser_macros.rs
@@ -40,7 +40,7 @@ macro_rules! _encode_tlv {
40
}
41
};
42
($stream: expr, $optional_type: expr, $optional_field: expr, (legacy, $fieldty: ty, $write: expr) $(, $self: ident)?) => {
43
- $crate::_encode_tlv!($stream, $optional_type, $write($($self)?), option);
+ $crate::_encode_tlv!($stream, $optional_type, { let value: Option<$fieldty> = $write($($self)?); value }, option);
44
45
($stream: expr, $type: expr, $field: expr, optional_vec $(, $self: ident)?) => {
46
if !$field.is_empty() {
0 commit comments