Skip to content

Commit

Permalink
fix type inference in the value combinator
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed May 19, 2018
1 parent a7aa0c6 commit ed1abaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ macro_rules! value (
);
($i:expr, $res:expr) => (
{
Ok(($i, $res))
let res: IResult<_,_> = Ok(($i, $res));
res
}
);
);
Expand Down
4 changes: 4 additions & 0 deletions tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,7 @@ named!(
fn issue_759() {
assert_eq!(capability(b" abcqd"), Ok((&b"qd"[..], "a")));
}

named_args!(issue_771(count: usize)<Vec<u32>>,
length_count!(value!(count), call!(nom::be_u32))
);

0 comments on commit ed1abaf

Please sign in to comment.