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

Replaces broken tutorial code with working example #1577

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ltrujello
Copy link

Hi,

This is a simple PR to fix some code in the documentation. The documentation itself is well written and gives newcomers a great idea for how this library is meant to be used, but the example code doesn't work. Others have pointed this out here.

I followed what the documentation code was attempting to do (it was trying to use the library as an example to parse HTTP request lines). So I put together the bare minimum to get the intended example working, keeping the original comments/typing as well.

I think this will get newcomers up and running with the library much faster and they'll be more motivated to use the library if the example code is working. Personally I still found the docs useful in understanding this library.

@epage
Copy link
Contributor

epage commented Dec 2, 2022

As an alternative, I've been experimenting with different ideas for nom in a fork which includes pulling the various markdown files into docs.rs which

  • Puts all documentation in one place
  • Ensures the documentation at least compiles

See winnow-rs/winnow#1

@ltrujello
Copy link
Author

Looks very cool! Feel free to take what I wrote up if you like.

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

2 participants