Conversation
|
rustbot has assigned @samueltardieu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
a512585 to
00bcf66
Compare
|
Thanks for the quick review! I hope I have addressed all the comments |
|
@ada4a Don't hesitate to open an FCP on Zulip when you think this is ready. |
|
Thank you @samueltardieu :) |
|
I think I have addressed the comments, if there is anything else that stands out let me know, otherwise I would like to start with this and treat the additional cases as future enhancements. In particular, it would be nice to handle the case where the popped value is, since I believe that is common, but I am not quite sure on how to transform an |
I think it could help to look at some real-world examples, see how they would need to be transformed, and implement just those pattern-suggestion pairs, as a start. For this, you could use Lintcheck: you could open a test PR which makes the lint fire on more patterns, like any |
|
Reminder, once the PR becomes ready for a review, use |
Add a lint to detect when the recently added Vec::pop_if, VecDeque::pop_front_if, and VecDeque::pop_back_if are manually implemented. changelog: add [`manual_pop_if`] lint
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
I hope I fixed all the comments (thanks for the review)! I will need to look at the LintCheck suggestion next week |
|
First of all, let's deal with rustbot: @rustbot reviewer Now, let's give this a go:) FCP started at #clippy > FCP: `manual_pop_if` |
Add a lint to detect when the recently added Vec::pop_if, VecDeque::pop_front_if, and VecDeque::pop_back_if are manually implemented.
changelog: add [
manual_pop_if] lint