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

Suggest using eq_ignore_ascii_case on non case-sensitive string comparision #13204

Closed
CrazyboyQCD opened this issue Aug 2, 2024 · 2 comments · Fixed by #13334
Closed

Suggest using eq_ignore_ascii_case on non case-sensitive string comparision #13204

CrazyboyQCD opened this issue Aug 2, 2024 · 2 comments · Fixed by #13334
Assignees
Labels
A-lint Area: New lints

Comments

@CrazyboyQCD
Copy link

CrazyboyQCD commented Aug 2, 2024

What it does

Lint that suggests using eq_ignore_ascii_case on non case-sensitive string comparision.

Advantage

Drawbacks

No response

Example

a.to_xx_case() == b.to_xx_case()

Could be written as:

a.eq_ignore_ascii_case(b)
@CrazyboyQCD CrazyboyQCD added the A-lint Area: New lints label Aug 2, 2024
@nyurik
Copy link
Contributor

nyurik commented Sep 2, 2024

@rustbot claim

@nyurik
Copy link
Contributor

nyurik commented Sep 3, 2024

@CrazyboyQCD hi, I finished the implementation, but it may need some more unit tests - could you add some you could think of? Thx!

@bors bors closed this as completed in c71f0be Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants