about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2021-09-29 19:33:42 -0700
committerGitHub <noreply@github.com>2021-09-29 19:33:42 -0700
commit8f9f3aa04d0fc5dff13f8e045f30fc96a4928703 (patch)
treedd881983d7a6edd189a2343c73dfebc9185850c0 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parente392f5d90d6d0229ee4fa830642cb6e8df0bae03 (diff)
parent830ecbd96ce30e3885663512ed94cbd347e64615 (diff)
downloadrust-8f9f3aa04d0fc5dff13f8e045f30fc96a4928703.tar.gz
rust-8f9f3aa04d0fc5dff13f8e045f30fc96a4928703.zip
Rollup merge of #89335 - mbrubeck:range-is-sorted, r=cuviper
Optimize is_sorted for Range and RangeInclusive

The [`Step`] trait guarantees that `Range<impl Step>` yields items in sorted order.  We can override `Iterator::is_sorted` based on this guarantee, as we already do for `Iterator::min` and `max`.

Thank you to ``@fiveseven-lambda`` who pointed this out [on the Rust Users Forum](https://users.rust-lang.org/t/is-sorted-method-in-impl-iterator-for-range/64717).

[`Step`]: https://doc.rust-lang.org/stable/std/iter/trait.Step.html
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions