rust/library/core
Matthias Krüger efca25fddc
Rollup merge of #139745 - thaliaarchi:iter-unused-clone-copy, r=joboet
Avoid unused clones in `Cloned<I>` and `Copied<I>`

Avoid cloning in `Cloned<I>` or copying in `Copied<I>` when elements are only needed by reference or not at all. There is already some precedent for this, given that `__iterator_get_unchecked` is implemented, which can skip elements. The reduced clones are technically observable by a user impl of `Clone`.

r? libs-api
2025-04-14 21:55:37 +02:00
..
src Rollup merge of #139745 - thaliaarchi:iter-unused-clone-copy, r=joboet 2025-04-14 21:55:37 +02:00
Cargo.toml update cfgs 2025-04-09 12:29:59 +01:00