-
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
New lint: iter_next_slice #5597
Conversation
☔ The latest upstream changes (presumably #5563) made this pull request unmergeable. Please resolve the merge conflicts. |
71f51ad
to
a5bad06
Compare
@@ -0,0 +1,23 @@ | |||
#![warn(clippy::iter_next_slice)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#![warn(clippy::iter_next_slice)] | |
// run-rustfix | |
#![warn(clippy::iter_next_slice)] |
and a update-all-references.sh
run and this PR should be finished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have added the run-rustfix
marker and iter_next_slice.fixed
in the new commit.
However, the test failed at Clippy Test, cargo build stage. I'm not sure about the errors listed, is it about toolchain version incompatibility? Should I rebase this branch to the latest master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may have to rebase after #5665 is merged. In the meantime you could go ahead, remove the "WIP" prefixes from your commits and remove the "draft" status from this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have squashed all the commits into one, and have updated this PR status to Open.
e388a24
to
32fde0b
Compare
The test results are in and perfect! Looks like this PR is done. Thank you @flip1995 for your instructions and for accommodating newcomers like me, I will use this PR as a reference to work on other issues 👍 |
Thanks for your contribution! Always happy to get new contributors on their way. @bors r+ |
📌 Commit 32fde0b has been approved by |
New lint: iter_next_slice Hello, this is a work-in-progress PR for issue: #5572 I have implemented lint to replace `iter().next()` for `slice[index..]` and `array` with `get(index)` and `get(0)` respectively. However since I made a lot of changes, I would like to request some feedback before continuing so that I could fix mistakes. Thank you! --- changelog: - implement iter next slice lint and test - modify needless_continues, for_loop_over_options_result UI tests since they have `iter().next()`
💔 Test failed - checks-action_test |
@bors retry |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
I think the issue linked to this PR can be closed manually. On a side note @esamudera , you can setup a PR to automatically close an issue when merged by adding a line in your PR description (like you did for changelog):
It works also with |
Okay, thank you for the tip, I will add the issue keyword on my next PR 👍 |
Hello, this is a work-in-progress PR for issue: #5572
I have implemented lint to replace
iter().next()
forslice[index..]
andarray
withget(index)
andget(0)
respectively. However since I made a lot of changes, I would like to request some feedback before continuing so that I could fix mistakes.Thank you!
changelog: implement
iter_next_slice
lint and test, and modifyneedless_continues
,for_loop_over_options_result
UI tests since they haveiter().next()