-
Notifications
You must be signed in to change notification settings - Fork 106
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
How to match and return a one char? #234
Comments
I think that's the best that exists right now. I don't remember the reason why |
This |
I personally have found: char::from_str(s).unwrap() to read slightly better. Granted, it will panic if the matched string isn't one character while the |
I'm tries to write parser, that will return one matched char and I do not see, how I can achieve that in simple way:
Both infers return type as
()
. For now I found only such solution:Is there any better solution?
The text was updated successfully, but these errors were encountered: