rust/compiler/rustc_lint
Dylan DPC d5b86d5ee9
Rollup merge of #101690 - kadiwa4:avoid_iterator_last, r=oli-obk
Avoid `Iterator::last`

Adapters like `Filter` and `Map` use the default implementation of `Iterator::last` which is not short-circuiting (and so does `core::str::Split`). The predicate function will be run for every single item of the underlying iterator. I hope that removing those calls to `last` results in slight performance improvements.
2022-09-13 16:51:31 +05:30
..
src Rollup merge of #101690 - kadiwa4:avoid_iterator_last, r=oli-obk 2022-09-13 16:51:31 +05:30
Cargo.toml