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
Errors when running quickstart from docs #1183
Comments
The error tells you the problem. Your function should return a Result. The main function can do that. I think I can add the |
Thank you for explaining that @BurntSushi! There's definitely a lot I'm still absorbing about Rust :) I think having the quickstart example be self-contained in a |
What version of regex are you using?
1.10.4
Describe the bug at a high level.
When I run the quick example from the landing page of the regex docs, I get two errors.
What are the steps to reproduce the behavior?
First,
cargo add regex
to a new project. Then, run the example from the docs. (I can't link to it directly, so I'll copy it below.)What is the actual behavior?
I get an error:
If I change
lineno.parse::<u64>()?
tolineno.parse::<u64>().unwrap()
the error goes away, but then I run into a different error:What is the expected behavior?
I expect the example to work without errors. I'm new to Rust so I may just be missing something, but I think my expectation is that I can essentially copy/paste the example from the docs and it should work.
Thank you for any insights on this!
The text was updated successfully, but these errors were encountered: