Revert macro changes
Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
This commit is contained in:
parent
3af70176e3
commit
326b2c4582
1 changed files with 6 additions and 0 deletions
|
@ -158,6 +158,9 @@ macro_rules! from_le {
|
||||||
($obj:ident, $field:ident, $type:ty) => {
|
($obj:ident, $field:ident, $type:ty) => {
|
||||||
$obj.$field = <$type>::from_le($obj.$field);
|
$obj.$field = <$type>::from_le($obj.$field);
|
||||||
};
|
};
|
||||||
|
($obj:ident, [($field:ident, $type:ty) $(,)?]) => {
|
||||||
|
from_le![$obj, $field, $type];
|
||||||
|
};
|
||||||
($obj:ident, [($field:ident, $type:ty), $($rest:tt),+ $(,)?]) => {
|
($obj:ident, [($field:ident, $type:ty), $($rest:tt),+ $(,)?]) => {
|
||||||
from_le![$obj, $field, $type];
|
from_le![$obj, $field, $type];
|
||||||
from_le!($obj, [$($rest),+]);
|
from_le!($obj, [$($rest),+]);
|
||||||
|
@ -169,6 +172,9 @@ macro_rules! to_le {
|
||||||
($obj:ident, $field:ident, $type:ty) => {
|
($obj:ident, $field:ident, $type:ty) => {
|
||||||
$obj.$field = <$type>::to_le($obj.$field);
|
$obj.$field = <$type>::to_le($obj.$field);
|
||||||
};
|
};
|
||||||
|
($obj:ident, [($field:ident, $type:ty) $(,)?]) => {
|
||||||
|
to_le![$obj, $field, $type];
|
||||||
|
};
|
||||||
($obj:ident, [($field:ident, $type:ty), $($rest:tt),+ $(,)?]) => {
|
($obj:ident, [($field:ident, $type:ty), $($rest:tt),+ $(,)?]) => {
|
||||||
to_le![$obj, $field, $type];
|
to_le![$obj, $field, $type];
|
||||||
to_le!($obj, [$($rest),+]);
|
to_le!($obj, [$($rest),+]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue