Skip to content

Commit

Permalink
Fix derivation of Serialize and Deserialize
Browse files Browse the repository at this point in the history
Bitflags 2.0.0 now uses a newtype, so we need serde(transparent) to actually
(de-)serialize the field of that newtype.
  • Loading branch information
michaellass committed Mar 14, 2023
1 parent 1f3cf35 commit 648e571
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use std::path::Path;

bitflags! {
#[derive(Copy, Clone, Debug, Default, Eq, Hash, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize), serde(transparent))]
pub struct Flags: u32 {
const SECRM = EXT2_SECRM_FL;
const UNRM = EXT2_UNRM_FL;
Expand Down

0 comments on commit 648e571

Please sign in to comment.