Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Recipes had drifted from the implementation and weren't compiling #1695

Merged
merged 6 commits into from
Oct 21, 2023

Conversation

krtab
Copy link
Contributor

@krtab krtab commented Sep 29, 2023

This

  1. Adds the recipes to the doctests so that they don't drift anymore
  2. Fixes them

This

1. Adds the recipes to the doctests so that they don't drift anymore
2. Fixes them
@@ -99,7 +101,7 @@ pub fn pinline_comment<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&'a st
take_until("*)"),
tag("*)")
)
)(i)
).parse(i)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is required since #1631 has been merged.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nom is moving towards using traits instead of function as the main parser interface. You can still use functions though if you prefer

src/lib.rs Outdated
@@ -466,3 +466,7 @@ pub mod number;
#[cfg(feature = "docsrs")]
#[cfg_attr(feature = "docsrs", cfg_attr(feature = "docsrs", doc = include_str!("../doc/nom_recipes.md")))]
pub mod recipes {}

#[cfg(doctest)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not add doctest to the definition above?

@Geal Geal merged commit 6c059ac into rust-bakery:main Oct 21, 2023
14 checks passed
@Geal
Copy link
Collaborator

Geal commented Oct 21, 2023

it took a bit of fiddling, but now all tests are passing in CI. Thankyou for your help!

@krtab
Copy link
Contributor Author

krtab commented Oct 22, 2023

Perfect, I hadn't added the cfg because I wasn't sure how it would interract with the feature gate, great you figured it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants