rust/library/core
bors 63bacf14cd Auto merge of #82162 - cuviper:flat-fold, r=Mark-Simulacrum
Expand FlattenCompat folds

The former `chain`+`chain`+`fold` implementation looked nice from a
functional-programming perspective, but it introduced unnecessary layers
of abstraction on every `flat_map`/`flatten` fold. It's straightforward
to just fold each part in turn, and this makes it look like a simplified
version of the existing `try_fold` implementation.

For the `iter::bench_flat_map*` benchmarks, I get a large improvement in
`bench_flat_map_chain_sum`, from 1,598,473 ns/iter to 499,889 ns/iter,
and the rest are unchanged.
2021-02-25 00:36:05 +00:00
..
benches Unify way to flip 6th bit. (Same assembly generated) 2021-02-08 12:21:36 +00:00
src Auto merge of #82162 - cuviper:flat-fold, r=Mark-Simulacrum 2021-02-25 00:36:05 +00:00
tests Rollup merge of #82391 - RalfJung:miri-atomic-minmax, r=dtolnay 2021-02-23 16:10:30 +01:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00