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

IdentifierError variants are not mutually exclusive #978

Closed
Tracked by #882
mina86 opened this issue Nov 22, 2023 · 0 comments · Fixed by #942
Closed
Tracked by #882

IdentifierError variants are not mutually exclusive #978

mina86 opened this issue Nov 22, 2023 · 0 comments · Fixed by #942

Comments

@mina86
Copy link
Contributor

mina86 commented Nov 22, 2023

Remove IdentifierError::Empty and ContainSeparator variants as they
are redundant. The former is a special case of InvalidLength; the
latter is a special case of InvalidCharacter.

With that, remove length checking from validate_identifier_chars
(which didn’t belong there anyway) and rely on check in
validate_identifier_length instead.

@rnbguy rnbguy changed the title feat: improve set of IdentifierError variants IdentifierError variants are not mutually exclusive Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant