Skip to content
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

Is there any ambiguity in the ErrorKind Tag #484

Open
2 tasks done
baoyachi opened this issue Feb 26, 2024 · 2 comments
Open
2 tasks done

Is there any ambiguity in the ErrorKind Tag #484

baoyachi opened this issue Feb 26, 2024 · 2 comments
Labels
C-bug Category: Things not working as expected M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Milestone

Comments

@baoyachi
Copy link
Contributor

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:

winnow/src/error.rs

Lines 1075 to 1085 in df311c1

#[allow(missing_docs)]
pub enum ErrorKind {
Assert,
Token,
Tag,
Alt,
Many,
Eof,
Slice,
Complete,
Not,

Describe the solution you'd like

Is it changed to be consistent with the literal

Alternatives, if applicable

No response

Additional Context

No response

@baoyachi baoyachi added the C-enhancement Category: Raise on the bar on expectations label Feb 26, 2024
@epage epage added M-breaking-change Meta: Implementing or merging this will introduce a breaking change. C-bug Category: Things not working as expected and removed C-enhancement Category: Raise on the bar on expectations labels Feb 26, 2024
@epage
Copy link
Collaborator

epage commented Feb 26, 2024

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

@epage epage added this to the 0.7.0 milestone Feb 26, 2024
@epage
Copy link
Collaborator

epage commented Mar 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Things not working as expected M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Projects
None yet
Development

No branches or pull requests

2 participants