]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix `impl_writeable_tlv_based_enum` to not require `DecodeError`
authorMatt Corallo <git@bluematt.me>
Thu, 1 Dec 2022 19:14:43 +0000 (19:14 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 1 Dec 2022 19:14:43 +0000 (19:14 +0000)
`impl_writeable_tlv_based_enum` shouldn't be assuming that
`DecodeError` is in scope, which we address here.

lightning/src/util/ser_macros.rs

index 3e1d8a9280d43da344076854739a5a81436f450b..caed542c19b6806cef2b20e849993b2f4e13dc9c 100644 (file)
@@ -679,7 +679,7 @@ macro_rules! impl_writeable_tlv_based_enum {
                                                Ok($st::$tuple_variant_name(Readable::read(reader)?))
                                        }),*
                                        _ => {
-                                               Err(DecodeError::UnknownRequiredFeature)
+                                               Err($crate::ln::msgs::DecodeError::UnknownRequiredFeature)
                                        },
                                }
                        }