mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
d5b86d5ee9
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.