Skip to content

Commit

Permalink
Specify full import path in decode_tlv macro
Browse files Browse the repository at this point in the history
Prevents unresolved import error
  • Loading branch information
valentinewallace committed Oct 7, 2022
1 parent 7bc52aa commit a031ff9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightning/src/util/ser_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,17 @@ macro_rules! decode_tlv {
decode_tlv!($reader, $field, required)
}};
($reader: expr, $field: ident, required) => {{
$field = ser::Readable::read(&mut $reader)?;
$field = ::util::ser::Readable::read(&mut $reader)?;
}};
($reader: expr, $field: ident, vec_type) => {{
let f: ::util::ser::VecReadWrapper<_> = ser::Readable::read(&mut $reader)?;
let f: ::util::ser::VecReadWrapper<_> = ::util::ser::Readable::read(&mut $reader)?;
$field = Some(f.0);
}};
($reader: expr, $field: ident, option) => {{
$field = Some(ser::Readable::read(&mut $reader)?);
$field = Some(::util::ser::Readable::read(&mut $reader)?);
}};
($reader: expr, $field: ident, ignorable) => {{
$field = ser::MaybeReadable::read(&mut $reader)?;
$field = ::util::ser::MaybeReadable::read(&mut $reader)?;
}};
($reader: expr, $field: ident, (option: $trait: ident $(, $read_arg: expr)?)) => {{
$field = Some($trait::read(&mut $reader $(, $read_arg)*)?);
Expand Down

0 comments on commit a031ff9

Please sign in to comment.