Skip to content
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

Optimize is_sorted for Range and RangeInclusive #89335

Merged
merged 1 commit into from Sep 30, 2021

Commits on Sep 28, 2021

  1. Optimize is_sorted for Range and RangeInclusive

    The `Step` trait guarantees that `Range<impl Step>` yields items in
    sorted order.  We can override the `Iterator::is_sorted` method based on
    this guarantee, as we already do for `Iterator::min` and `max`.
    mbrubeck committed Sep 28, 2021
    Copy the full SHA
    830ecbd View commit details
    Browse the repository at this point in the history