Skip to content

Commit

Permalink
Add serde impls for CompactLengthInner
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Burns <[email protected]>
  • Loading branch information
nicoburns committed Jan 11, 2025
1 parent 270cd3d commit 5586809
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/style/compact_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ mod inner {
/// The tagged pointer always has a tag and may contain an f32 value or a pointer
/// (or neither) depending on the variant indicated by the tag.
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub(super) struct CompactLengthInner {
/// The tagged pointer
tagged_ptr: *const (),
Expand Down Expand Up @@ -118,6 +119,7 @@ mod inner {
/// Either an f32 value or a pointer (or neither) are packed into the ptr field
/// depending on the variant indicated by the tag
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub(super) struct CompactLengthInner {
/// The tag indicating what kind of value we are storing
tag: usize,
Expand Down

0 comments on commit 5586809

Please sign in to comment.