]> git.lizzy.rs Git - rust.git/commit
Auto merge of #35856 - phimuemue:master, r=brson
authorbors <bors@rust-lang.org>
Sat, 3 Sep 2016 04:02:41 +0000 (21:02 -0700)
committerGitHub <noreply@github.com>
Sat, 3 Sep 2016 04:02:41 +0000 (21:02 -0700)
commitd128e6bc74ce750ab94dffa422a77e740eba877a
tree9bd8b6c9766fff2b15e716c7641249085f449ad8
parent100b309fd1b951fa074556f9e3a50354d1ed7923
parent5928be1d9bcd96ce4dd7b328fe527683a4e1621f
Auto merge of #35856 - phimuemue:master, r=brson

Introduce max_by/min_by on iterators

See https://github.com/rust-lang/rfcs/issues/1722 for reference.

It seems that there is `min`, `max` (simple computation of min/max), `min_by_key`, `max_by_key` (min/max by comparing mapped values) but no `min_by` and `max_by` (min/max according to comparison function). However, e.g. on vectors or slices there is `sort`, `sort_by_key` and `sort_by`.
src/libcore/iter/iterator.rs
src/libcoretest/lib.rs