-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add manual-strip
lint
#6038
Add manual-strip
lint
#6038
Conversation
Add a new lint, `manual-strip`, that suggests using the `str::strip_prefix` and `str::strip_suffix` methods introduced in Rust 1.45 when the same functionality is performed 'manually'. Closes #5734
(rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #6013) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
Testing rustbot @rustbot modify labels: +S-waiting-on-author -S-waiting-on-review |
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
thanks! |
📌 Commit 79a0e51 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This is quite broad, as it doesn't just test for the simple case. The lint is triggering in a block of code that I have where not only do I need the access the stripped part, but there's also side effects. |
Add
manual-strip
lint.changelog: Add
manual-strip
lint