rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

Unnecessary call to min/max method

Open l0ngvh opened this issue 1 year ago • 5 comments

Continuation of https://github.com/rust-lang/rust-clippy/pull/12061 Fix https://github.com/rust-lang/rust-clippy/issues/11901 and https://github.com/rust-lang/rust-clippy/issues/11924

This implementation only deal with literal int, like i32::MAX, -6_i32, 0

changelog: added lint [unnecessary_min_max]

l0ngvh avatar Feb 28 '24 04:02 l0ngvh

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

rustbot avatar Feb 28 '24 04:02 rustbot

:umbrella: The latest upstream changes (presumably #12508) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Mar 22 '24 13:03 bors

zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/FCP.20.60unnecessary_min_max.60

Alexendoo avatar Mar 30 '24 15:03 Alexendoo

:umbrella: The latest upstream changes (presumably #12631) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Apr 04 '24 23:04 bors

:umbrella: The latest upstream changes (presumably #12567) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar May 03 '24 09:05 bors

:umbrella: The latest upstream changes (presumably #12815) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jun 03 '24 09:06 bors

There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

You can start a rebase with the following commands:

$ # rebase
$ git pull --rebase https://github.com/rust-lang/rust-clippy.git master
$ git push --force-with-lease

The following commits are merge commits:

  • aa83de2e5ba9f467a1e7a7896307d0d8dcc2693d

rustbot avatar Jun 03 '24 09:06 rustbot

:umbrella: The latest upstream changes (presumably #12287) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Jun 16 '24 23:06 bors

Great, thanks!

@bors r+

Alexendoo avatar Jun 20 '24 14:06 Alexendoo

:pushpin: Commit 2f9f204123b857606e7b65d217a3b71920fccf20 has been approved by Alexendoo

It is now in the queue for this repository.

bors avatar Jun 20 '24 14:06 bors

:hourglass: Testing commit 2f9f204123b857606e7b65d217a3b71920fccf20 with merge 3e84ca8ac95623bc5a36886873b12bd95fd8f700...

bors avatar Jun 20 '24 14:06 bors

:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test Approved by: Alexendoo Pushing 3e84ca8ac95623bc5a36886873b12bd95fd8f700 to master...

bors avatar Jun 20 '24 14:06 bors