-
Notifications
You must be signed in to change notification settings - Fork 790
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
alt!
+ map!
+ call!
strange behavior
#58
Comments
Hi! Thanks for your report, I'm on it |
It should work with that commit. You do not have to use |
Now For example: Ok: named!(parse_u32<&[u8], u32>, map_res!(map_res!(digit, str::from_utf8), call!(|s: &str| s.parse::<u32>()))); Err: named!(parse_u32<&[u8], u32>, map_res!(map_res!(digit, str::from_utf8), |s: &str| s.parse::<u32>())); |
ok, I'll fix them as well |
Hi! I think 94fbe95 will fix it for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alt!
+map!
+call!
have strange behavior.This code work. See to closure in
map!
:If we try to wrap closure in
map!
bycall!
, it will not work:Error:
But if we use
map!
withoutalt!
it have different behavior. Next code work:Without
call!
it not work:Error:
The text was updated successfully, but these errors were encountered: