Skip to content

Commit

Permalink
Add custom impl of <Flag as FromMeta>::from_none
Browse files Browse the repository at this point in the history
  • Loading branch information
TedDriggs committed Apr 11, 2022
1 parent afd8501 commit f65b10b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ impl Deref for Flag {
}

impl FromMeta for Flag {
fn from_none() -> Option<Self> {
Some(Flag(None))
}

fn from_meta(mi: &syn::Meta) -> Result<Self> {
FromMeta::from_meta(mi).map(Flag)
}
Expand Down

0 comments on commit f65b10b

Please sign in to comment.