Skip to content

Enhance CHARS_*_CMP lint #2057

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

Merged
merged 2 commits into from
Sep 16, 2017
Merged

Enhance CHARS_*_CMP lint #2057

merged 2 commits into from
Sep 16, 2017

Conversation

topecongiro
Copy link
Contributor

This PR

  1. updates chars_next_cmp lint to warn against method call with unwrap() (cc Lint to suggest starts_with and ends_with instead of chars().next().unwrap() #1818).
  2. adds chars_last_cmp lint, which is similar to chars_next_cmp.

Closes #1818.

@llogiq
Copy link
Contributor

llogiq commented Sep 16, 2017

Thank you! Great suggestions!

@llogiq llogiq merged commit 708a818 into rust-lang:master Sep 16, 2017
@topecongiro topecongiro deleted the issue-1818 branch September 16, 2017 07:19
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 this pull request may close these issues.

2 participants