diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-13 03:33:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-13 03:33:57 +0100 |
| commit | 73feddb9d4509498e9aeb4075a1f1c24b6bad962 (patch) | |
| tree | a7eefc25327ab135d272d3464e8ed88ac09def91 /src/libsyntax/parse/parser | |
| parent | c22566d96dc69975570caa8e2c2a82fbfbfd9ae2 (diff) | |
| parent | 6cc5a3d9cc470e2db2b2a45fcddb2350ac0b039e (diff) | |
| download | rust-73feddb9d4509498e9aeb4075a1f1c24b6bad962.tar.gz rust-73feddb9d4509498e9aeb4075a1f1c24b6bad962.zip | |
Rollup merge of #59138 - timvermeulen:simplify_select_fold1, r=sfackler
Simplify Iterator::{min, max}
This PR simplifies the `select_fold1` helper method used to implmement `Iterator::{min, min_by, min_by_key, max, max_by, max_by_key}` by removing the projection argument, which was only used by the implementations of `min_by_key` and `max_by_key`.
I also added tests to ensure that the stability as mentioned in the comments of `min` and `max` is preserved, and fixed the `iter::{bench_max, bench_max_by_key}` benchmarks which the compiler presumably was able to collapse into closed-form expressions. None of the benchmark results were impacted, I suspect their generated assembly didn't change.
Diffstat (limited to 'src/libsyntax/parse/parser')
0 files changed, 0 insertions, 0 deletions
