rust/src/libcore
Mazdak Farrokhzad 73feddb9d4
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.
2019-03-13 03:33:57 +01:00
..
benches Fix the bench_max and bench_max_by_key benchmarks 2019-03-12 17:52:10 +01:00
char Stabilize TryFrom and TryInto 2019-02-13 18:00:18 +01:00
fmt avoid unnecessary use of MaybeUninit::get_ref, and expand comment on the others 2019-02-22 23:05:58 +01:00
future Put Future trait into spotlight 2019-02-20 22:06:30 +01:00
hash libs: doc comments 2019-02-10 23:57:25 +00:00
iter Forward max and min to max_by and min_by respectively 2019-03-12 20:24:10 +01:00
num Rollup merge of #58998 - xTibor:doc_from_bytes, r=scottmcm 2019-03-13 03:33:39 +01:00
ops Fix RangeBounds documentation to include inclusive operations 2019-03-11 20:55:24 -04:00
prelude Remove licenses 2018-12-25 21:08:33 -07:00
slice Add a tracking issue for new as_slice methods 2019-03-05 16:28:32 -08:00
str Replace s with self in docs for str methods taking self. 2019-02-27 17:07:35 +01:00
sync Bootstrap compiler update for 1.35 release 2019-03-02 09:05:34 -07:00
task Merging master 2019-02-12 22:46:14 -08:00
tests Rollup merge of #59138 - timvermeulen:simplify_select_fold1, r=sfackler 2019-03-13 03:33:57 +01:00
unicode Remove licenses 2018-12-25 21:08:33 -07:00
alloc.rs heading # Unsafety => # Safety in stdlib docs. 2019-02-25 08:01:35 +01:00
any.rs tests: doc comments 2019-02-10 23:42:32 +00:00
array.rs Use lifetime contravariance to elide more lifetimes in core+alloc+std 2019-03-09 19:10:28 -08:00
ascii.rs Remove licenses 2018-12-25 21:08:33 -07:00
borrow.rs Remove licenses 2018-12-25 21:08:33 -07:00
Cargo.toml std: Depend directly on crates.io crates 2018-12-11 21:08:22 -08:00
cell.rs libs: doc comments 2019-02-10 23:57:25 +00:00
clone.rs Auto merge of #57125 - doitian:inconsistent-clone-doc, r=bluss 2019-01-01 20:50:13 +00:00
cmp.rs Use lifetime contravariance to elide more lifetimes in core+alloc+std 2019-03-09 19:10:28 -08:00
convert.rs Remove stabilized feature gate in doctest 2019-03-12 17:42:42 +01:00
default.rs libs: doc comments 2019-02-10 23:57:25 +00:00
ffi.rs libs: doc comments 2019-02-10 23:57:25 +00:00
hint.rs libs: doc comments 2019-02-10 23:57:25 +00:00
internal_macros.rs Use lifetime contravariance to elide more lifetimes in core+alloc+std 2019-03-09 19:10:28 -08:00
intrinsics.rs Bootstrap compiler update for 1.35 release 2019-03-02 09:05:34 -07:00
iter_private.rs Remove licenses 2018-12-25 21:08:33 -07:00
lib.rs Stabilize unrestricted_attribute_tokens 2019-02-25 23:21:54 +03:00
macros.rs Bootstrap compiler update for 1.35 release 2019-03-02 09:05:34 -07:00
marker.rs Bootstrap compiler update for 1.35 release 2019-03-02 09:05:34 -07:00
mem.rs Rollup merge of #58660 - RalfJung:maybe-uninit, r=Centril 2019-03-09 17:18:16 +01:00
option.rs Remove stray ` in the documentation for the FromIterator implementation for Option 2019-03-03 13:25:55 +01:00
panic.rs Remove licenses 2018-12-25 21:08:33 -07:00
panicking.rs Remove licenses 2018-12-25 21:08:33 -07:00
pin.rs Auto merge of #58866 - kennytm:rollup, r=kennytm 2019-03-03 08:47:51 +00:00
ptr.rs Rollup merge of #59130 - RalfJung:non-null, r=rkruppe 2019-03-13 03:33:54 +01:00
raw.rs Remove licenses 2018-12-25 21:08:33 -07:00
result.rs impl FromIterator for Result: Use assert_eq! instead of assert! 2019-03-11 21:04:34 -04:00
time.rs Rollup merge of #58595 - stjepang:make-duration-consts-associated, r=oli-obk 2019-02-23 09:25:29 +01:00
tuple.rs Remove licenses 2018-12-25 21:08:33 -07:00
unit.rs Remove licenses 2018-12-25 21:08:33 -07:00