winnow-rs / winnow

Making parsing a breeze
https://docs.rs/winnow
Other
525 stars 40 forks source link

Is there any ambiguity in the ErrorKind Tag #484

Open baoyachi opened 7 months ago

baoyachi commented 7 months ago

Please complete the following tasks

winnow version

0.6.2

Describe your use case

I noticed that in Winnow version 0.5.38, the tag function was discarded and replaced with literal. Related links: https://docs.rs/winnow/0.5.38/src/winnow/token/mod.rs.html#156 -163

But in ErrorKind, there is still an enumeration value for Tag, does this look like there is code ambiguity?

Related links: https://github.com/winnow-rs/winnow/pull/464/files

The ErrorKind code:https://github.com/winnow-rs/winnow/blob/df311c1d20ea8680b9852e73658fd400ac76513f/src/error.rs#L1075-L1085

Describe the solution you'd like

Is it changed to be consistent with the literal

Alternatives, if applicable

No response

Additional Context

No response

epage commented 7 months ago

Looks like I forgot to rename ErrorKind::Tag when I renamed tag.

epage commented 7 months ago

::Many is another one (should be ::Repeat)