nom
nom copied to clipboard
Are nom::Err and nom::error necessary?
I had a hell of a time figuring out the right way to create an error. The solution finally was:
assert_eq!(
check_eye_color(" ecl:amb"),
Err(nom::Err::Error(nom::error::Error::new(
" ecl:amb",
nom::error::ErrorKind::Tag
)))
);
Is it necessary to have this stuff spread out across two modules?
The types themselves all seem necessary, as they all serve a different purpose and are composed together, but I agree that Err should definitely be in error, and probably a lot of the stuff in error should be reexported in nom