Skip to content

Commit

Permalink
Merge pull request #5 from reciperium/fix/serde
Browse files Browse the repository at this point in the history
fix!: make serde optional and add serialize if enabled
  • Loading branch information
woile authored Apr 23, 2024
2 parents 5a08529 + c29c5c6 commit 7de5a96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/recipe-parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage = { workspace = true }
categories = ["command-line-interface", "parser-implementations"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde = { version = "1", features = ["derive"], optional = true }
winnow = "0.6.6"

[dev-dependencies]
Expand All @@ -21,3 +21,6 @@ serde_json = "1.0"

[lib]
path = "src/lib.rs"

[features]
serde = ["dep:serde"]
1 change: 1 addition & 0 deletions crates/recipe-parser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ fn parse_backstory<'a>(input: &mut Input<'a>) -> PResult<&'a str> {
**************** */

#[derive(Debug, Clone, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
pub enum Token<'a> {
Metadata {
key: &'a str,
Expand Down

0 comments on commit 7de5a96

Please sign in to comment.