Skip to content

Commit

Permalink
Add support for impl mode structs to be repr(packed)
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Nov 29, 2023
1 parent 6c67922 commit 2bcecf8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ macro_rules! __impl_public_bitflags_ops {
&self,
f: &mut $crate::__private::core::fmt::Formatter,
) -> $crate::__private::core::fmt::Result {
$crate::__private::core::fmt::Binary::fmt(&self.0, f)
let inner = self.0;
$crate::__private::core::fmt::Binary::fmt(&inner, f)
}
}

Expand All @@ -330,7 +331,8 @@ macro_rules! __impl_public_bitflags_ops {
&self,
f: &mut $crate::__private::core::fmt::Formatter,
) -> $crate::__private::core::fmt::Result {
$crate::__private::core::fmt::Octal::fmt(&self.0, f)
let inner = self.0;
$crate::__private::core::fmt::Octal::fmt(&inner, f)
}
}

Expand All @@ -339,7 +341,8 @@ macro_rules! __impl_public_bitflags_ops {
&self,
f: &mut $crate::__private::core::fmt::Formatter,
) -> $crate::__private::core::fmt::Result {
$crate::__private::core::fmt::LowerHex::fmt(&self.0, f)
let inner = self.0;
$crate::__private::core::fmt::LowerHex::fmt(&inner, f)
}
}

Expand All @@ -348,7 +351,8 @@ macro_rules! __impl_public_bitflags_ops {
&self,
f: &mut $crate::__private::core::fmt::Formatter,
) -> $crate::__private::core::fmt::Result {
$crate::__private::core::fmt::UpperHex::fmt(&self.0, f)
let inner = self.0;
$crate::__private::core::fmt::UpperHex::fmt(&inner, f)
}
}

Expand Down

0 comments on commit 2bcecf8

Please sign in to comment.